mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-30 21:41:53 +08:00
These have to be in "s in order to do a string comparison, since they were not, they were never matching anything. ;( Fix them all up, and also block a few more repos on pagure that are getting heavily crawled. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
23 lines
820 B
Plaintext
23 lines
820 B
Plaintext
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} off
|
|
RewriteCond %{QUERY_STRING} Special:Userlogin [NC]
|
|
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]
|
|
|
|
RewriteCond %{HTTPS} off
|
|
RewriteCond %{QUERY_STRING} action= [NC]
|
|
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NE,L]
|
|
|
|
# Spiders-gone-wild
|
|
# These spiders may not follow robots.txt and will
|
|
# hit admin sections which consume large amounts of CPU
|
|
RewriteCond %{HTTP_USER_AGENT} "(Bytespider|ClaudeBot|Amazonbot|YandexBot|ChatGLM-Spider|GPTBot|Barkrowler|YisouSpider|MJ12bot)" [NC]
|
|
RewriteRule .* - [F,L]
|
|
|
|
# /wiki must come before /w due to prefix matching.
|
|
ProxyPass {{wikipath}} {{proxyurl}}{{wikipath}}
|
|
ProxyPassReverse {{wikipath}} {{proxyurl}}{{wikipath}}
|
|
|
|
ProxyPass {{wpath}} {{proxyurl}}{{wpath}}
|
|
ProxyPassReverse {{wpath}} {{proxyurl}}{{wpath}}
|