Skip to content

Commit 685148c

Browse files
committed
2773: Ensure "online-check" can be cached
1 parent 5161cf4 commit 685148c

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.docker/vhost.conf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ server {
99
proxy_pass http://node:3000;
1010

1111
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
12-
add_header Pragma "no-cache";
13-
add_header Expires "0";
12+
}
13+
14+
location /client/online-check/ {
15+
proxy_set_header X-Forwarded-For $remote_addr;
16+
proxy_set_header Host $http_host;
17+
proxy_pass http://node:3000;
18+
19+
add_header Cache-Control "public, max-age=604800";
1420
}
1521

1622
location /client/ws {

infrastructure/itkdev/etc/confd/templates/default.conf.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ server {
44
root /var/www/html;
55

66
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
7-
add_header Pragma "no-cache";
8-
add_header Expires "0";
97

108
location {{ getenv "APP_SCREEN_CLIENT_PATH" "/" }} {
119
rewrite ^{{ getenv "APP_SCREEN_CLIENT_PATH" "/" }}(.*) /$1 break;
@@ -15,6 +13,10 @@ server {
1513
try_files $uri $uri/ =404;
1614
}
1715

16+
location = {{ getenv "APP_SCREEN_CLIENT_PATH" "" }}/online-check/ {
17+
add_header Cache-Control "public, max-age=604800";
18+
}
19+
1820
location = {{ getenv "APP_SCREEN_CLIENT_PATH" "" }}/robots.txt {
1921
add_header Content-Type text/plain;
2022
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

infrastructure/os2display/etc/confd/templates/default.conf.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ server {
1515
try_files $uri $uri/ =404;
1616
}
1717

18+
location = {{ getenv "APP_SCREEN_CLIENT_PATH" "" }}/online-check/ {
19+
add_header Cache-Control "public, max-age=604800";
20+
}
21+
1822
location = {{ getenv "APP_SCREEN_CLIENT_PATH" "" }}/robots.txt {
1923
add_header Content-Type text/plain;
2024
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";

0 commit comments

Comments
 (0)