Add a special case for /github-redirect.html to avoid CSP headers
This static file includes an inline script. By using `add_header` within
the location, headers from the outer server context are not set and this
static HTML is served without CSP headers.
@@ -200,6 +200,13 @@ http {
expires 1d;
}
+ location = /github-redirect.html {
+ add_header X-Content-Type-Options nosniff;
+ add_header Cache-Control public;
+ root dist;
+ expires 1d;
+ }
+
add_header X-Content-Type-Options "nosniff";
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
