Skip to content

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented May 21, 2025

Description (required)

This PR adds a new page under the experimental section that documents the upcoming CSP support.

For Astro version: 5.9.0. See astro PR #13802 and the docs/changeset PR #13870

I leave here the link to RFC too: https://github.com/withastro/roadmap/blob/feat/rfc-csp/proposals/0055-csp.md

@netlify
Copy link

netlify bot commented May 21, 2025

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 7031252
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/683f2e7c75d2670008441a2b
😎 Deploy Preview https://deploy-preview-11736--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Contributor

astrobot-houston commented May 21, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/reference/experimental-flags/csp.mdx Localization added, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@ematipico ematipico added the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label May 21, 2025
@ematipico ematipico added this to the 5.9.0 milestone May 21, 2025
@ematipico ematipico self-assigned this May 21, 2025
@sarah11918 sarah11918 added the merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) label May 21, 2025
@zaitovalisher
Copy link
Contributor

zaitovalisher commented May 27, 2025

That's huge, cool and elegant solution that covers 90% of my needs. Great job @ematipico!

I will use your solution for google analytics, comments and styles. And Zaraz for the rest (which is ad placement, cause those are added on top of a built website and need nonces).

@sarah11918 sarah11918 added the minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah! label May 28, 2025
@louisescher
Copy link
Member

Not a direct change request, but the client router being incompatible (as discussed in the API bash) isn't mentioned anywhere yet, so that'd be nice to include.

Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

I left some nits regarding some types, otherwise LGTM (including Sarah's suggestions). Great job Ema!

Copy link
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

I didn't pay attention to that earlier, but I believe there is a typo each time we use style-src. According to Syntax on MDN or Content Security Policy (CSP) Quick Reference Guide, style-src is not different from the other directives: no colon, only a space.

Otherwise, LGTM!

Copy link
Contributor

@JusticeMatthew JusticeMatthew left a comment

Choose a reason for hiding this comment

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

Few small things my ocd flagged flagged for me 😄

Co-authored-by: Matthew Justice <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Jun 3, 2025
@sarah11918 sarah11918 changed the base branch from main to 5.9.0 June 3, 2025 17:21
@sarah11918 sarah11918 merged commit fcf0040 into 5.9.0 Jun 3, 2025
6 checks passed
@sarah11918 sarah11918 deleted the feat/csp-docs branch June 3, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! merge-on-release Don't merge this before the feature is released! (MQ=approved but WAIT for feature release!) minor-release For the next minor release; in the milestone, "merge queue" when approved by Sarah!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants