diff --git a/common/src/app/common/version.cljc b/common/src/app/common/version.cljc index 20250bcf6d..f1ee1dfc4b 100644 --- a/common/src/app/common/version.cljc +++ b/common/src/app/common/version.cljc @@ -14,7 +14,8 @@ (defn parse [data] (cond - (str/starts-with? data "%") + (or (str/starts-with? data "%") + (= data "develop")) {:full "develop" :branch "develop" :base "0.0.0" diff --git a/docker/devenv/files/nginx.conf b/docker/devenv/files/nginx.conf index 6af0fef033..3a0441232e 100644 --- a/docker/devenv/files/nginx.conf +++ b/docker/devenv/files/nginx.conf @@ -38,11 +38,11 @@ http { gzip_vary on; gzip_proxied any; - gzip_comp_level 3; + gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; - gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json image/svg+xml; + gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json image/svg+xml application/wasm; map $http_upgrade $connection_upgrade { default upgrade; @@ -223,16 +223,15 @@ http { add_header X-Cache-Status $upstream_cache_status; } - location ~ ^/(/|css|fonts|images|js|wasm|mjs|map) { + location ~* \.(js|css|jpg|png|svg|ttf|woff|woff2|wasm)$ { + add_header Cache-Control "public, max-age=604800" always; # 7 days } location ~ ^/[^/]+/(.*)$ { return 301 " /404"; } - add_header Cache-Control "no-store"; - # This header is what we need to use on prod - # add_header Cache-Control "public, must-revalidate, max-age=0"; + add_header Cache-Control "no-store, no-cache, max-age=0" always; try_files $uri /index.html$is_args$args /index.html =404; } } diff --git a/docker/images/files/nginx.conf.template b/docker/images/files/nginx.conf.template index 152193e332..9a5a57244f 100644 --- a/docker/images/files/nginx.conf.template +++ b/docker/images/files/nginx.conf.template @@ -42,11 +42,11 @@ http { gzip_vary on; gzip_proxied any; gzip_static on; - gzip_comp_level 4; + gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; - gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json image/svg+xml; + gzip_types text/plain text/css text/javascript application/javascript application/json application/transit+json image/svg+xml application/wasm; proxy_buffer_size 16k; proxy_busy_buffers_size 24k; # essentially, proxy_buffer_size + 2 small buffers of 4k @@ -142,15 +142,15 @@ http { location / { include /etc/nginx/overrides/location.d/*.conf; - - location ~ ^/(/|css|fonts|images|js|wasm|mjs|map) { + location ~* \.(js|css|jpg|png|svg|ttf|woff|woff2|wasm)$ { + add_header Cache-Control "public, max-age=604800" always; # 7 days } location ~ ^/[^/]+/(.*)$ { return 301 " /404"; } - add_header Cache-Control "public, must-revalidate, max-age=0"; + add_header Cache-Control "no-store, no-cache, max-age=0" always; try_files $uri /index.html$is_args$args /index.html =404; } } diff --git a/frontend/playwright/ui/pages/BasePage.js b/frontend/playwright/ui/pages/BasePage.js index e0c170396e..b07029be86 100644 --- a/frontend/playwright/ui/pages/BasePage.js +++ b/frontend/playwright/ui/pages/BasePage.js @@ -73,7 +73,7 @@ export class BasePage { } static async mockConfigFlags(page, flags) { - const url = "**/js/config.js"; + const url = "**/js/config.js*"; return await page.route(url, (route) => route.fulfill({ status: 200, diff --git a/frontend/resources/templates/index.mustache b/frontend/resources/templates/index.mustache index 550120ee93..0aec1f1920 100644 --- a/frontend/resources/templates/index.mustache +++ b/frontend/resources/templates/index.mustache @@ -17,22 +17,25 @@ - + {{#isDebug}} - + {{/isDebug}} - {{# manifest}} - - - - {{/manifest}} + + {{# manifest}} + + + + {{/manifest}} + @@ -45,7 +48,7 @@ {{# manifest}} {{/manifest}} diff --git a/frontend/resources/templates/preview-head.mustache b/frontend/resources/templates/preview-head.mustache index 740482ff84..f5ba11ca7f 100644 --- a/frontend/resources/templates/preview-head.mustache +++ b/frontend/resources/templates/preview-head.mustache @@ -1,4 +1,4 @@ - +