Merge "Allow for ability to block status.json referers"
This commit is contained in:
commit
95403bb22d
@ -51,6 +51,7 @@ class zuul (
|
|||||||
$proxy_ssl_cert_file_contents = '',
|
$proxy_ssl_cert_file_contents = '',
|
||||||
$proxy_ssl_key_file_contents = '',
|
$proxy_ssl_key_file_contents = '',
|
||||||
$proxy_ssl_chain_file_contents = '',
|
$proxy_ssl_chain_file_contents = '',
|
||||||
|
$block_referers = [],
|
||||||
) {
|
) {
|
||||||
include ::httpd
|
include ::httpd
|
||||||
include pip
|
include pip
|
||||||
|
@ -19,6 +19,10 @@
|
|||||||
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
|
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
<% @block_referers.each do |referer| -%>
|
||||||
|
RewriteCond %{HTTP_REFERER} =<%= referer %>
|
||||||
|
RewriteRule ^/status.json - [F]
|
||||||
|
<% end -%>
|
||||||
RewriteRule ^/status.json$ http://127.0.0.1:8001/status.json [P]
|
RewriteRule ^/status.json$ http://127.0.0.1:8001/status.json [P]
|
||||||
RewriteRule ^/status/(.*) http://127.0.0.1:8001/status/$1 [P]
|
RewriteRule ^/status/(.*) http://127.0.0.1:8001/status/$1 [P]
|
||||||
|
|
||||||
@ -80,6 +84,10 @@
|
|||||||
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
|
CustomLog ${APACHE_LOG_DIR}/<%= @vhost_name %>-access.log combined
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
<% @block_referers.each do |referer| -%>
|
||||||
|
RewriteCond %{HTTP_REFERER} =<%= referer %>
|
||||||
|
RewriteRule ^/status.json - [F]
|
||||||
|
<% end -%>
|
||||||
RewriteRule ^/status.json$ http://127.0.0.1:8001/status.json [P]
|
RewriteRule ^/status.json$ http://127.0.0.1:8001/status.json [P]
|
||||||
RewriteRule ^/status/(.*) http://127.0.0.1:8001/status/$1 [P]
|
RewriteRule ^/status/(.*) http://127.0.0.1:8001/status/$1 [P]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user