From 08177457ce2d91f621f5105539eefa3883b5a7fe Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Wed, 9 Oct 2024 07:38:14 +0100 Subject: [PATCH] Add header only if content-negotiation emulation fails --- salt/docs/config/nginx.docs-redirects.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/docs/config/nginx.docs-redirects.conf b/salt/docs/config/nginx.docs-redirects.conf index f0b6d7d5..0f02d5c4 100644 --- a/salt/docs/config/nginx.docs-redirects.conf +++ b/salt/docs/config/nginx.docs-redirects.conf @@ -182,10 +182,10 @@ location ~ ^/(searchindex.js|objects.inv)$ { # Redirect ``$request_uri`` -> ``$request_uri.html``, # where the latter is a valid webpage. location ~ ^/((2|3)(\.[0-9]+)?|dev)/\w+/[\d\w\.]+(?!\.html)$ { - add_header Surrogate-Key en/$1 always; if (-f "${request_filename}.html") { return 301 https://$host:$request_uri.html; } + add_header Surrogate-Key en/$1 always; } # Add the Surrogate-Key for bulk CDN purging