fix: ingress cache conditions

This commit is contained in:
ange 2025-05-03 03:53:36 +00:00
parent f9e4091c34
commit 221dcc7cfe
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D

View File

@ -12,10 +12,10 @@ metadata:
more_set_headers Content-Security-Policy "frame-ancestors 'self'"; more_set_headers Content-Security-Policy "frame-ancestors 'self'";
nginx.ingress.kubernetes.io/server-snippet: | nginx.ingress.kubernetes.io/server-snippet: |
if ($request_uri = "/") { if ($request_uri = /) {
more_set_headers "Cache-Control: no-cache"; more_set_headers "Cache-Control: no-cache";
} }
if ($request_uri ~* "^/(config.*\.json|i18n|home|sites|index\.html)$") { if ($request_uri ~* ^/(config\..*\.json|i18n|home|sites|index\.html)$) {
more_set_headers "Cache-Control: no-cache, no-store, must-revalidate"; more_set_headers "Cache-Control: no-cache, no-store, must-revalidate";
} }
spec: spec: