Skip to content

Commit

Permalink
Merge pull request #2241 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2186-to-release-4.14

[release-4.14] OCPBUGS-27471: prevent plugin entry assets from caching
  • Loading branch information
openshift-merge-bot[bot] committed Jan 31, 2024
2 parents bfc823b + 0580bf2 commit cef0da4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions assets/monitoring-plugin/config-map.yaml
Expand Up @@ -12,6 +12,20 @@ data:
ssl_certificate /var/cert/tls.crt;
ssl_certificate_key /var/cert/tls.key;
root /usr/share/nginx/html;
# Prevent caching for plugin-manifest.json
location = /plugin-manifest.json {
add_header Cache-Control 'no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0';
add_header Pragma 'no-cache';
add_header Expires '0';
}
# Prevent caching for plugin-entry.js
location = /plugin-entry.js {
add_header Cache-Control 'no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0';
add_header Pragma 'no-cache';
add_header Expires '0';
}
}
}
kind: ConfigMap
Expand Down
14 changes: 14 additions & 0 deletions jsonnet/components/monitoring-plugin.libsonnet
Expand Up @@ -26,6 +26,20 @@ function(params)
ssl_certificate %(tlsPath)s/tls.crt;
ssl_certificate_key %(tlsPath)s/tls.key;
root /usr/share/nginx/html;
# Prevent caching for plugin-manifest.json
location = /plugin-manifest.json {
add_header Cache-Control 'no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0';
add_header Pragma 'no-cache';
add_header Expires '0';
}
# Prevent caching for plugin-entry.js
location = /plugin-entry.js {
add_header Cache-Control 'no-cache, no-store, must-revalidate, proxy-revalidate, max-age=0';
add_header Pragma 'no-cache';
add_header Expires '0';
}
}
}
||| % { tlsPath: tlsMountPath, nginxPort: nginxPort };
Expand Down

0 comments on commit cef0da4

Please sign in to comment.