diff --git a/files/nginx/odk.conf.template b/files/nginx/odk.conf.template index 701e7e1c..e0496f24 100644 --- a/files/nginx/odk.conf.template +++ b/files/nginx/odk.conf.template @@ -47,6 +47,11 @@ server { add_header Strict-Transport-Security "max-age=63072000" always; add_header X-Frame-Options "SAMEORIGIN"; add_header X-Content-Type-Options nosniff; + + # transparently follow 307 redirects + # See: https://serverfault.com/a/792035 + proxy_intercept_errors on; + error_page 307 = @transparent_proxy_no_auth; } location ~ ^/v\d { @@ -58,11 +63,6 @@ server { proxy_request_buffering on; proxy_buffering off; proxy_read_timeout 2m; - - # transparently follow 307 redirects - # See: https://serverfault.com/a/792035 - proxy_intercept_errors on; - error_page 307 = @transparent_proxy_no_auth; } location @transparent_proxy_no_auth {