diff --git a/aidlc-docs/features/gitea-deployment-workflow/audit.md b/aidlc-docs/features/gitea-deployment-workflow/audit.md index 680e0c4..f74f90b 100644 --- a/aidlc-docs/features/gitea-deployment-workflow/audit.md +++ b/aidlc-docs/features/gitea-deployment-workflow/audit.md @@ -1334,3 +1334,14 @@ by Infrastructure Design. U5 carries REF-U3-01's Umami origin gate plus FR-21 an **Context**: OPERATIONS — Deployment Setup, instance-naming correction before final approval --- +## Deployment Setup — Clarified SecurityHeaders and MasterModule Config Guidance + +**Timestamp**: 2026-07-28T04:25:00Z + +**User Input**: "Ik snap niet wat ik precies moet invullen voor de SecurityHeaders velden in de env bestanden. Ook zie ik de MasterModule property. Die is als het goed is niet nodig voor een API mest de master module, toch?" + +**AI Response**: "Corrected a real error in my own draft: AllowedConnectOrigins__0 was documented with a placeholder, but per domain-entities.md (U3), Sentry deliberately needs NO connect-src exception — U4's same-origin tunnel (MapSentryTunnel()) exists specifically to avoid that. Both SecurityHeaders fields are only needed for Umami (script-src to load the tracking script, connect-src for its analytics beacons) and should be omitted entirely if Umami isn't used. Confirmed MasterModule__MasterUrl is optional and unvalidated at startup (MasterModuleOptions.MasterUrl is nullable; CmsInstanceService just logs a warning and skips reconciliation if unset, verified against the actual code and its unit test VerifyIntegrityAsync_SkipsCheck_WhenMasterUrlNotConfigured) — safe to leave unset if this instance won't manage any slave CMS instances. Rewrote the shared/env template in deployment-instructions.md with inline comments explaining exactly when each optional field is needed." + +**Context**: OPERATIONS — Deployment Setup, configuration guidance clarified before final approval + +--- diff --git a/aidlc-docs/features/gitea-deployment-workflow/operations/deployment/deployment-instructions.md b/aidlc-docs/features/gitea-deployment-workflow/operations/deployment/deployment-instructions.md index 29ba084..58f1f29 100644 --- a/aidlc-docs/features/gitea-deployment-workflow/operations/deployment/deployment-instructions.md +++ b/aidlc-docs/features/gitea-deployment-workflow/operations/deployment/deployment-instructions.md @@ -110,10 +110,36 @@ ConnectionStrings__DefaultConnection=Server=127.0.0.1,1433;User ID=;Passwo JwtSettings__Secret= JwtSettings__Issuer=SlpModularCms JwtSettings__Audience=SlpModularCmsPortal + +# Optional — only meaningful if this instance manages slave CMS instances via the /cms page. +# MasterModuleOptions.MasterUrl is nullable and unvalidated at startup: if left unset, the Master +# module's background reconciliation just logs a warning and skips its work ("MasterUrl not +# configured; skipping integrity check") — it never crashes or blocks startup. Safe to leave out +# entirely if you don't plan to register any slave instances under this deployment; set it to this +# environment's own public URL (e.g. https://slpsoftware.nl) if you do. MasterModule__MasterUrl=https:// + +# Optional — empty/absent is a fully supported state: Sentry is simply skipped and console logging +# continues (see Observability section in README.md). Observability__SentryDsn= -SecurityHeaders__AllowedScriptOrigins__0= -SecurityHeaders__AllowedConnectOrigins__0= + +# Optional — both only needed if this instance uses Umami analytics (VITE_UMAMI_SCRIPT_URL set for +# the frontend build). Leave both lines out entirely if you don't use Umami; there is no other +# origin either one needs by default. +# +# Set BOTH to the Umami script's origin (scheme + host only, no path — e.g. if +# VITE_UMAMI_SCRIPT_URL=https://analytics.slpsoftware.nl/script.js, use +# https://analytics.slpsoftware.nl for both lines below): +# - AllowedScriptOrigins: lets the browser load Umami's tracking script (CSP script-src) +# - AllowedConnectOrigins: lets that script send its analytics beacons back (CSP connect-src) — +# loading a script and letting it phone home are two separate CSP directives +# +# Sentry does NOT need an entry here, on either line: U4 built a same-origin tunnel +# (Program.cs -> MapSentryTunnel()) specifically so browser error reports never leave this origin, +# precisely to avoid needing a connect-src exception (and to dodge ad blockers, which commonly +# block direct requests to Sentry's own domains). +SecurityHeaders__AllowedScriptOrigins__0= +SecurityHeaders__AllowedConnectOrigins__0= ``` Use ports **5100** (test) and **5101** (production) unless something else on the Pi already occupies them. `ASPNETCORE_ENVIRONMENT=Production` is used for **both** environments deliberately —