Repository navigation
app/: security headers (sc-8900) - #80
Closed
ndbroadbent wants to merge 2 commits into
Closed
ndbroadbent wants to merge 2 commits into
ndbroadbent wants to merge 2 commits into
Conversation
…ff, the referrer policy, no framing (DENY, over Laravel's SAMEORIGIN) and the Content-Security-Policy allowing only VisualCI's scripts, the built page's inline script hashes (VISUALCI_FRONTEND_DIR) and the analytics; x-powered-by dropped; the gallery's /g/ paths CORS and CORP cross-origin; outermost, so the host check's 404s carry them too
VisualCIdocspring/visualci · build #282 · 331 unchanged · no changes This PR vs base: nothing since #273, across 1 build Updated as builds change. Agents can review with VisualCI's MCP tools. |
…e the server serves (public/index.html under the application's base path, the frontend in the same image), read once at boot; in production a missing page or one with no inline scripts stops the boot (the theme script would be blocked), elsewhere it's logged
Member
Author
|
Included in #87. |
This was referenced Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of sc-8900. Ports
server/src/security_headers.rsas global middleware, outermost so that the host check's 404s carry the headers too.X-Content-Type-Options: nosniffandReferrer-Policy: strict-origin-when-cross-origin.X-Frame-Options: DENY. Laravel's own default isSAMEORIGIN; this sets it explicitly, to match the policy'sframe-ancestors 'none'.VISUALCI_FRONTEND_DIR, defaultfrontend/dist, on the first response);S3_PUBLIC_ENDPOINT's origin, for a dev server;form-action, so MCP OAuth callbacks aren't blocked.x-powered-byis dropped./g/paths get CORS*and CORPcross-origin, so its images can be embedded anywhere.Tests: today's unit tests, ported (only inline scripts hashed; the policy's contents), and an integration test that a normal response and a host-check 404 both carry the headers. The whole app suite passes on docspring-dev, and clippy is clean.