1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

switching from add_header to more_set_headers

This commit is contained in:
yalh76 2020-06-02 18:09:04 +02:00
parent 58d242453a
commit 61ff116a2c

View file

@ -29,7 +29,7 @@
location __PATH__ { location __PATH__ {
alias __FINALPATH__/public/; alias __FINALPATH__/public/;
add_header ETag ""; proxy_hide_header ETag;
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
@ -44,8 +44,8 @@
location ~* (assets|plugins|uploads)/.*\.(eot|ttf|woff|woff2|ico)$ { location ~* (assets|plugins|uploads)/.*\.(eot|ttf|woff|woff2|ico)$ {
expires 1y; expires 1y;
add_header Cache-Control public,immutable; more_set_headers "Cache-Control : public,immutable";
add_header Access-Control-Allow-Origin *; more_set_headers "Access-Control-Allow-Origin : *";
} }
location = __PATH__/srv/status { location = __PATH__/srv/status {
@ -64,7 +64,7 @@
# longer term we should increas probably to 1y # longer term we should increas probably to 1y
location ~ ^/javascripts/ { location ~ ^/javascripts/ {
expires 1d; expires 1d;
add_header Cache-Control public,immutable; more_set_headers "Cache-Control : public,immutable";
} }
location ~ ^/assets/(?<asset_path>.+)$ { location ~ ^/assets/(?<asset_path>.+)$ {
@ -72,7 +72,7 @@
# asset pipeline enables this # asset pipeline enables this
# brotli_static on; # brotli_static on;
gzip_static on; gzip_static on;
add_header Cache-Control public,immutable; more_set_headers "Cache-Control : public,immutable";
# HOOK in asset location (used for extensibility) # HOOK in asset location (used for extensibility)
# TODO I don't think this break is needed, it just breaks out of rewrite # TODO I don't think this break is needed, it just breaks out of rewrite
break; break;
@ -80,13 +80,13 @@
location ~ ^/plugins/ { location ~ ^/plugins/ {
expires 1y; expires 1y;
add_header Cache-Control public,immutable; more_set_headers "Cache-Control : public,immutable";
} }
# cache emojis # cache emojis
location ~ /images/emoji/ { location ~ /images/emoji/ {
expires 1y; expires 1y;
add_header Cache-Control public,immutable; more_set_headers "Cache-Control : public,immutable";
} }
location ~ ^/uploads/ { location ~ ^/uploads/ {
@ -104,7 +104,7 @@
proxy_set_header X-Sendfile-Type X-Accel-Redirect; proxy_set_header X-Sendfile-Type X-Accel-Redirect;
proxy_set_header X-Accel-Mapping __FINALPATH__/public/=/downloads/; proxy_set_header X-Accel-Mapping __FINALPATH__/public/=/downloads/;
expires 1y; expires 1y;
add_header Cache-Control public,immutable; more_set_headers "Cache-Control : public,immutable";
## optional upload anti-hotlinking rules ## optional upload anti-hotlinking rules
#valid_referers none blocked mysite.com *.mysite.com; #valid_referers none blocked mysite.com *.mysite.com;
@ -206,7 +206,7 @@
} }
location @__NAME__ { location @__NAME__ {
add_header Referrer-Policy 'no-referrer-when-downgrade'; more_set_headers "Referrer-Policy : no-referrer-when-downgrade";
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Request-Start "t=${msec}"; proxy_set_header X-Request-Start "t=${msec}";
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;