Skip to content

Add opt-in CSP embedding and plugin restrictions#1440

Open
jmestwa-coder wants to merge 1 commit intoapache:masterfrom
jmestwa-coder:csp-opt-in-embedding-protection
Open

Add opt-in CSP embedding and plugin restrictions#1440
jmestwa-coder wants to merge 1 commit intoapache:masterfrom
jmestwa-coder:csp-opt-in-embedding-protection

Conversation

@jmestwa-coder
Copy link
Copy Markdown

Summary

Add an opt-in method to apply stricter CSP directives for embedding and plugin restrictions.

Changes

  • Introduce enableStrictEmbeddingProtection() in CSPHeaderConfiguration

  • Adds:

    • frame-ancestors 'self'
    • object-src 'none'

Why

  • frame-ancestors 'self' limits embedding to the same origin (clickjacking protection)
  • object-src 'none' disables plugin-based content
  • Keeping this opt-in avoids breaking existing applications

Impact

  • No default behavior changes
  • Fully backward compatible
  • Provides a simple way to enable stricter CSP when needed

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