Skip to content

[v6.2] Fix CSP/X-Frame-Options headers#80

Draft
simonhammes wants to merge 2 commits into
mainfrom
csp-x-frame-options
Draft

[v6.2] Fix CSP/X-Frame-Options headers#80
simonhammes wants to merge 2 commits into
mainfrom
csp-x-frame-options

Conversation

@simonhammes
Copy link
Copy Markdown
Collaborator

@simonhammes simonhammes commented May 15, 2026

@simonhammes simonhammes changed the title Fix CSP/X-Frame-Options headers [v6.2] Fix CSP/X-Frame-Options headers May 15, 2026
Comment on lines 93 to 94
caddy_0.route_5: /external-apps/*
caddy_0.route_5.header.X-Frame-Options: "ALLOWALL"
caddy_0.route_5.header.-Content-Security-Policy: ""
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This completely removes the CSP header for all universal apps.

What was the initial purpose of this? Allow embedding apps and forms within other pages? The commit message of dbe7f6c suggests this.

We could do this through a frame-ancestors directive

Copy link
Copy Markdown
Collaborator Author

@simonhammes simonhammes May 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely disabling the CSP for a bunch of path prefixes seems like the wrong approach for this

We could do this through a frame-ancestors directive

However, this should probaly still be path-scoped to prevent unnecessary risk of clickjacking attacks.


Maybe strict SameSite settings for auth cookies are "enough" to defend against clickjacking attacks:

As an additional partial mitigation, sites should set the SameSite cookie attribute for session cookies to Lax or Strict. Requests from embedded contexts such as <iframe> elements that are not same-site with the top-level document will not include these cookies, and the server will therefore not treat the request as coming from a logged-in user.

This is required in order to preview AI-generated HTML pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant