Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Document-Policy header #484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Seirdy
Copy link
Contributor

@Seirdy Seirdy commented Aug 12, 2022

This header accomplishes the following:

  • Forbids document.write
  • Forbids document.domain
  • Forbids use of profiling APIs
  • Forbids popups (similar to the overly-agressive "sandbox" CSP
    directive; uplifed from the deprecated Feature-Policy header)

These are preffed off in Chromium as "experimental"; the only DP
directive currently enabled in Chromium is "force-load-at-top".

More information:

To try this out, go to "chrome://flags" and enable experimental web
platform features. See implementation status at
https://bugs.chromium.org/p/chromium/issues/detail?id=993790.

@Seirdy Seirdy force-pushed the feat/document-policy branch from 12f7ed9 to a4a87ed Compare August 12, 2022 04:58
@thestinger thestinger force-pushed the main branch 10 times, most recently from f68494a to b0b84a0 Compare August 18, 2022 19:51
@thestinger thestinger force-pushed the main branch 2 times, most recently from c6701d3 to 66132ef Compare August 26, 2022 03:15
@thestinger
Copy link
Member

@Seirdy We had to rebase the repository to fix some commit messages for a legal reason. Can you rebase this?

This header accomplishes the following:

- Forbids document.write
- Forbids document.domain
- Forbids use of profiling APIs
- Forbids popups (similar to the overly-agressive "sandbox" CSP
  directive; uplifed from the deprecated Feature-Policy header)

These are preffed off in Chromium as "experimental"; the only DP
directive currently enabled in Chromium is "force-load-at-top".

More information:

- Document-Policy explainer:
  https://github.com/wicg/document-policy/blob/main/document-policy-explainer.md

- Document-Policy specification:
  https://wicg.github.io/document-policy/

- Current directives supported in Chromium:
  https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/blink/renderer/core/permissions_policy/document_policy_features.json5

To try this out, go to "chrome://flags" and enable experimental web
platform features. See implementation status at
https://bugs.chromium.org/p/chromium/issues/detail?id=993790.
@thestinger thestinger force-pushed the main branch 13 times, most recently from 6df6261 to 9ff9ebe Compare December 9, 2024 22:49
@thestinger thestinger force-pushed the main branch 7 times, most recently from 344eae9 to 8889812 Compare December 20, 2024 22:09
@thestinger thestinger force-pushed the main branch 2 times, most recently from fde2131 to df7ee49 Compare December 29, 2024 21:13
@thestinger thestinger force-pushed the main branch 5 times, most recently from 5e4c313 to 811e79d Compare January 18, 2025 08:18
@thestinger thestinger force-pushed the main branch 2 times, most recently from 571f78e to e456753 Compare January 26, 2025 14:19
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.

3 participants