diff --git a/conf/nginx.conf b/conf/nginx.conf index ce405b9..919fa8d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -15,9 +15,9 @@ location @handle_redirect { proxy_hide_header x-amz-server-side-encryption; proxy_pass $redirect_uri; - add_header x-internal-redirect "$redirect_uri"; - add_header x-cache-control "$redirect_cache_control"; - add_header cache-control "$redirect_cache_control"; + more_set_headers "x-internal-redirect: '$redirect_uri'"; + more_set_headers "x-cache-control: '$redirect_cache_control'"; + more_set_headers "cache-control: '$redirect_cache_control'"; } location /assets { @@ -42,15 +42,15 @@ location /internal/gfonts/css { proxy_set_header Host "fonts.googleapis.com"; proxy_set_header Accept "*/*"; - add_header Access-Control-Allow-Origin $http_origin; - add_header Cache-Control max-age=86400; - add_header X-Cache-Status $upstream_cache_status; + more_set_headers "Access-Control-Allow-Origin: $http_origin"; + more_set_headers "Cache-Control: max-age=86400"; + more_set_headers "X-Cache-Status: $upstream_cache_status"; } -location /internal/assets { +location /internal/assets/ { internal; - alias __DATA_DIR__/assets; - add_header x-internal-redirect "$upstream_http_x_accel_redirect"; + alias __DATA_DIR__/assets/; + more_set_headers "x-internal-redirect: '$upstream_http_x_accel_redirect'"; } location /api/export { @@ -90,17 +90,17 @@ location / { # proxy_cache penpot; - add_header Access-Control-Allow-Origin $http_origin; - add_header Cache-Control max-age=86400; - add_header X-Cache-Status $upstream_cache_status; + more_set_headers "Access-Control-Allow-Origin: $http_origin"; + more_set_headers "Cache-Control: max-age=86400"; + more_set_headers "X-Cache-Status: $upstream_cache_status"; } location ~* \.(js|css).*$ { - add_header Cache-Control "max-age=86400" always; # 24 hours + more_set_headers "Cache-Control: 'max-age=86400' always"; # 24 hours } location ~* \.(html).*$ { - add_header Cache-Control "no-cache, max-age=0" always; + more_set_headers "Cache-Control: 'no-cache, max-age=0' always"; } location ~ ^/(/|css|fonts|images|js|wasm) {