Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
fff2396c
Commit
fff2396c
authored
Oct 17, 2019
by
Markus Scheidgen
Browse files
Fixed the missing caching on gui/meta.json bug.
parent
eeb8bbd9
Pipeline
#62122
passed with stages
in 20 minutes and 47 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gui/src/components/App.js
View file @
fff2396c
...
...
@@ -201,8 +201,14 @@ class NavigationUnstyled extends React.Component {
}
componentDidMount() {
fetch(`${guiBase}/meta.json`)
.then((response) => response.json())
fetch(`${guiBase}/meta.json`, {
method:
'
GET
'
,
cache:
'
no
-
cache
'
,
headers: {
'
Pragma
'
:
'
no
-
cache
'
,
'
Cache
-
Control
'
:
'
no
-
cache
,
no
-
store
'
}
}).then((response) => response.json())
.then((meta) => {
if (meta.version !== packageJson.version) {
console.log(
'
GUI
API
version
mismatch
'
)
...
...
ops/helm/nomad/templates/gui-deployment.yml
View file @
fff2396c
...
...
@@ -39,6 +39,16 @@ data:
rewrite ^{{ .Values.proxy.external.path }}/gui/service-worker.js /nomad/service-worker.js break;
}
location {{ .Values.proxy.external.path }}/gui/meta.json {
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
root /app/;
rewrite ^{{ .Values.proxy.external.path }}/gui/meta.json /nomad/meta.json break;
}
location {{ .Values.proxy.external.path }}/api/uploads {
client_max_body_size 35g;
proxy_request_buffering off;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment