diff --git a/CHANGELOG.md b/CHANGELOG.md index efd2d49..5885bd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## v2 release: Improved NGINX configuration for performance and compatibility +## 2.0.0 + +_v2 release: Improved NGINX configuration for performance and compatibility_ 2025-02-19 @@ -9,6 +11,8 @@ - Ensured proper trailing slash redirections. - Updated proxy settings for better MinIO integration. -## v1 release: Initial release +## 1.0.0 + +_v1 release: Initial release_ 2025-02-09 diff --git a/helm-chart/templates/_helpers.tpl b/helm-chart/templates/_helpers.tpl index d57f4b6..375c596 100644 --- a/helm-chart/templates/_helpers.tpl +++ b/helm-chart/templates/_helpers.tpl @@ -4,9 +4,14 @@ Generate the content for the NGINX configuration. {{- define "nginx.configmap.content" -}} {{- range .Values.sites }} server { - listen 80; + {{ if .apex }} + server_name {{ .host }}; + {{ else if .subdomain }} + server_name {{ .subdomain }}.{{ .host }}; + {{ else }} server_name {{ .name }}.{{ .host }}; - + {{ end }} + listen 80; gzip on; gzip_disable "msie6"; gzip_vary on; @@ -48,8 +53,10 @@ server { proxy_ssl_server_name on; proxy_ssl_verify off; error_page 404 {{ .errorPage }}; - - add_header Cache-Control "public, max-age={{ $.Values.maxAge }}, stale-while-revalidate={{ $.Values.staleWhileRevalidate }}" always; + + proxy_hide_header Cache-Control; + add_header Cache-Control "public, max-age={{ $.Values.maxAge }}, stale-while-revalidate={{ $.Values.staleWhileRevalidate }}, stale-if-error={{ $.Values.staleIfError }}" always; + } } {{- end }} diff --git a/helm-chart/templates/ingress.yaml b/helm-chart/templates/ingress.yaml index d7e012e..647aa67 100644 --- a/helm-chart/templates/ingress.yaml +++ b/helm-chart/templates/ingress.yaml @@ -8,7 +8,13 @@ metadata: spec: rules: {{- range .Values.sites }} + {{- if .apex }} + - host: {{ .host }} + {{- else if .subdomain }} + - host: {{ .subdomain }}.{{ .host }} + {{- else }} - host: {{ .name }}.{{ .host }} + {{ end }} http: paths: - path: /