From 70ce54db72cbe55017208875d04cec695734984f Mon Sep 17 00:00:00 2001 From: shimoncohen Date: Sun, 20 Apr 2025 19:28:25 +0300 Subject: [PATCH] helm(nginx): add Access-Control-Max-Age header to server context --- helm/config/default.conf | 2 ++ helm/values.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/helm/config/default.conf b/helm/config/default.conf index e0b2cf2..80aceed 100644 --- a/helm/config/default.conf +++ b/helm/config/default.conf @@ -52,6 +52,8 @@ server { uwsgi_read_timeout {{ .Values.mapproxy.uwsgi.timeoutSeconds }}; uwsgi_send_timeout {{ .Values.mapproxy.uwsgi.timeoutSeconds }}; uwsgi_connect_timeout {{ .Values.mapproxy.uwsgi.timeoutSeconds }}; + # In case you use "add_header" in the location block, this "add_header" will be ignored! + add_header 'Access-Control-Max-Age' '{{ .Values.nginx.headers.accessControlMaxAge | default "7200" }}'; location /liveness { access_log off; log_not_found off; diff --git a/helm/values.yaml b/helm/values.yaml index a11523c..a1a5297 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -220,6 +220,8 @@ nginx: inactive: 60m expirationTime: 60m useTempPath: "off" + headers: + accessControlMaxAge: '' port: 8080 internalServicePort: 80