mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Block some leechers in Apache config
This commit is contained in:
parent
2258c4f742
commit
c1e8e83cfb
2 changed files with 12 additions and 0 deletions
|
@ -156,6 +156,12 @@ Define conf_rewrite_root ${web_root}/config/apache/rewrites
|
|||
ProxySet connectiontimeout=5 timeout=240
|
||||
</Proxy>
|
||||
|
||||
# Disable access to people attempting to clone the website and leech our resources by proxying via CloudFlare or some other service.
|
||||
# Such services will have the custom `X-Forwarded-For` HTTP header set.
|
||||
RewriteCond %{HTTP:X-Forwarded-For} . [OR]
|
||||
RewriteCond %{HTTP:CF-Connecting-IP} .
|
||||
RewriteRule ^.*$ - [F,L]
|
||||
|
||||
# In RewriteCond, RewriteRule gets evaluated BEFORE RewriteCond, so $1 refers to the first
|
||||
# match in RewriteRule
|
||||
# Rewrite POST /some/url -> POST /some/url/post.php
|
||||
|
|
|
@ -138,6 +138,12 @@ Define conf_rewrite_root ${web_root}/config/apache/rewrites
|
|||
ProxySet connectiontimeout=5 timeout=240
|
||||
</Proxy>
|
||||
|
||||
# Disable access to people attempting to clone the website and leech our resources by proxying via CloudFlare or some other service.
|
||||
# Such services will have the custom `X-Forwarded-For` HTTP header set.
|
||||
RewriteCond %{HTTP:X-Forwarded-For} . [OR]
|
||||
RewriteCond %{HTTP:CF-Connecting-IP} .
|
||||
RewriteRule ^.*$ - [F,L]
|
||||
|
||||
# In RewriteCond, RewriteRule gets evaluated BEFORE RewriteCond, so $1 refers to the first
|
||||
# match in RewriteRule
|
||||
# Rewrite POST /some/url -> POST /some/url/post.php
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue