Version frontend assets and disable stale caching
Build and publish frontend / publish (push) Successful in 41s

This commit is contained in:
Ein Anderssono
2026-10-16 00:43:09 +02:00
parent 00f7334580
commit d788ca39ec
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -72,7 +72,7 @@
</section>
</main>
<footer id="version-footer">Frontend <span id="frontend-version">__FRONTEND_VERSION__</span> · API <span id="api-version">hämtar version…</span></footer>
<script src="/voice.js"></script>
<script src="/voice.js?v=__FRONTEND_VERSION__"></script>
<script>
const auth = document.querySelector('#auth');
const play = document.querySelector('#play');
+3 -1
View File
@@ -10,7 +10,9 @@ server {
}
location / {
add_header Cache-Control "no-cache" always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
try_files $uri $uri/ /index.html;
}
}
+2
View File
@@ -4,6 +4,8 @@ set -euo pipefail
test -s index.html
grep -q '<html lang="sv">' index.html
grep -q 'id="frontend-version">__FRONTEND_VERSION__' index.html
grep -q '<script src="/voice.js?v=__FRONTEND_VERSION__"></script>' index.html
grep -q 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0' nginx/default.conf
grep -q "request('/version')" index.html
grep -Fq "credentials: 'same-origin'" index.html
grep -q 'id="dialogue" aria-label="Dialoghistorik" role="log" aria-live="polite"' index.html