nginx: add no-store cache header to code-server vhost

Prevents browser from restoring cached page with expired
Authelia session, which caused WebSocket 1006 on first load.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-27 09:21:55 +01:00
parent dc797ba09b
commit 1e7427ec0d

View file

@ -114,7 +114,14 @@ in
"adguard.nordhammer.it" = protectedProxy 3000;
"profilarr.nordhammer.it" = protectedProxy 6868;
"sabnzbd.nordhammer.it" = protectedProxy 8085;
"code.nordhammer.it" = protectedProxy 4444;
"code.nordhammer.it" = lib.recursiveUpdate (protectedProxy 4444) {
locations."/".extraConfig = autheliaAuthConfig + ''
# Prevent browser from restoring a cached page on tab reopen —
# forces a fresh request so Authelia can redirect before JS
# tries to open a WebSocket with an expired session.
add_header Cache-Control "no-store" always;
'';
};
"notes.nordhammer.it" = protectedProxy 5230;
# --- Local-only: serves update history JSON to Homepage's customapi widget ---