From 8fbcbac96dcddf28a6272b46fdb25b9c22ef082d Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 8 Dec 2025 10:00:54 -0800 Subject: [PATCH] pagure: fix order of operations to not block after proxying (which will not work) Signed-off-by: Kevin Fenzi --- roles/pagure/templates/0_pagure.conf | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/roles/pagure/templates/0_pagure.conf b/roles/pagure/templates/0_pagure.conf index ecd3f63ee0..e761f7cc6f 100644 --- a/roles/pagure/templates/0_pagure.conf +++ b/roles/pagure/templates/0_pagure.conf @@ -161,22 +161,6 @@ MaxConnectionsPerChild 1000 {% endif %} - # proxy all requests to anubis after ssl termination - - RequestHeader set "X-Real-Ip" expr=%{REMOTE_ADDR} - RequestHeader set X-Forwarded-Proto "https" - RequestHeader set "X-Http-Version" "%{SERVER_PROTOCOL}s" - # Pagure uses X-Scheme, not X-Forwarded-Proto, see pagure/proxy.py - RequestHeader set X-Scheme "https" - - ProxyPreserveHost On - - ProxyRequests Off - ProxyVia Off - - ProxyPass / http://[::1]:8923/ - ProxyPassReverse / http://[::1]:8923/ - # Drop distributed web hits # RewriteEngine On # RewriteCond %{REQUEST_URI} ^/linux-forgeperf.*$ @@ -193,6 +177,22 @@ MaxConnectionsPerChild 1000 RewriteCond %{HTTP_USER_AGENT} "(Bytespider|ClaudeBot|Amazonbot|YandexBot|ChatGLM-Spider|GPTBot|Barkrowler|YisouSpider|MJ12bot)" [NC] RewriteRule .* - [F,L] + # proxy all requests to anubis after ssl termination + + RequestHeader set "X-Real-Ip" expr=%{REMOTE_ADDR} + RequestHeader set X-Forwarded-Proto "https" + RequestHeader set "X-Http-Version" "%{SERVER_PROTOCOL}s" + # Pagure uses X-Scheme, not X-Forwarded-Proto, see pagure/proxy.py + RequestHeader set X-Scheme "https" + + ProxyPreserveHost On + + ProxyRequests Off + ProxyVia Off + + ProxyPass / http://[::1]:8923/ + ProxyPassReverse / http://[::1]:8923/ + SetHandler server-status