diff --git a/app/config.py b/app/config.py index 2a4c099..e48ba4a 100644 --- a/app/config.py +++ b/app/config.py @@ -83,7 +83,7 @@ class Settings(BaseSettings): ssh_key: str = "" # PEM private key content (paste full key including headers) # Application version — used by the /api/v1/updates/check endpoint - app_version: str = "1.0.0-26" + app_version: str = "1.0.0-27" # ---- Authentication (1.0.0-22) ---- # session_secret: HMAC key for signing session cookies. Empty = generate diff --git a/app/main.py b/app/main.py index 99268a4..01c16c3 100644 --- a/app/main.py +++ b/app/main.py @@ -121,6 +121,52 @@ async def lifespan(app: FastAPI): app = FastAPI(title="TrueNAS Burn-In Dashboard", lifespan=lifespan) +# --------------------------------------------------------------------------- +# Defense-in-depth security headers +# --------------------------------------------------------------------------- + +# CSP allows the CDNs we actively load: +# unpkg.com — htmx + htmx-sse-extension +# cdnjs.cloudflare.com — qrcodejs (history print page) +# cdn.jsdelivr.net — xterm.js (terminal tab, lazy-loaded) +# 'unsafe-inline' is needed for inline