Skip to content

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Dec 8, 2025

Description (required)

This PR stabilise the CSP APIs.

Moves the CSP APIs and configuration in the proper sections.

I only moved the content, I didn't update the current wording.

Also, I took the liberty to refactor the security section because it became quite lengthy, so I thought it required a proper header now.

For Astro version: 6.0. See astro PR #14946 and JSDoc in PR #15007

Note for translators:

In some of the adapter pages, the link text may also need updating to remove the word "experimental" where it exists. I have only done English and French in this PR, but we have zh-cn, ja, and ko pages to check. These can be done on this PR, or on the v6 branch itself if this PR is already merged. (Feel free to make direct commits to v6 for this if needed.)

cc @liruifengv , @jp-knj , and @jsparkdev

@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit fae8d3a
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/693c59745f55130008afc819
😎 Deploy Preview https://deploy-preview-12859--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 Dec 8, 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/guides/integrations-guide/netlify.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/node.mdx Source changed, localizations will be marked as outdated.
en/guides/integrations-guide/vercel.mdx Source changed, localizations will be marked as outdated.
en/guides/view-transitions.mdx Source changed, localizations will be marked as outdated.
en/reference/adapter-reference.mdx Source changed, localizations will be marked as outdated.
en/reference/api-reference.mdx Source changed, localizations will be marked as outdated.
en/reference/configuration-reference.mdx Source changed, localizations will be marked as outdated.
en/reference/experimental-flags/csp.mdx Source removed, will stop being tracked.
fr/guides/integrations-guide/netlify.mdx Localization changed, will be marked as complete.
fr/guides/integrations-guide/node.mdx Localization changed, will be marked as complete.
fr/guides/integrations-guide/vercel.mdx Localization changed, will be marked as complete.
fr/guides/view-transitions.mdx Localization changed, will be marked as complete.
fr/reference/adapter-reference.mdx Localization changed, will be marked as complete.
fr/reference/experimental-flags/csp.mdx Localization removed, will be marked as missing.
ja/guides/integrations-guide/netlify.mdx Localization changed, will be marked as complete.
ja/guides/integrations-guide/node.mdx Localization changed, will be marked as complete.
ja/guides/integrations-guide/vercel.mdx Localization changed, will be marked as complete.
ko/guides/integrations-guide/netlify.mdx Localization changed, will be marked as complete.
ko/guides/integrations-guide/node.mdx Localization changed, will be marked as complete.
ko/guides/integrations-guide/vercel.mdx Localization changed, will be marked as complete.
ko/guides/view-transitions.mdx Localization changed, will be marked as complete.
ko/reference/adapter-reference.mdx Localization changed, will be marked as complete.
zh-cn/guides/integrations-guide/netlify.mdx Localization changed, will be marked as complete.
zh-cn/guides/integrations-guide/node.mdx Localization changed, will be marked as complete.
zh-cn/guides/integrations-guide/vercel.mdx Localization changed, will be marked as complete.
zh-cn/reference/experimental-flags/csp.mdx Localization removed, will be marked as missing.
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.

@sarah11918
Copy link
Member

Thanks @ematipico ! We'll also need to add something to the v6 upgrade guide at https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#experimental-flags

This flag can be added to the block of all the flags being removed, then probably just a very similar entry under https://deploy-preview-12322--astro-docs-2.netlify.app/en/guides/upgrade-to/v6/#experimental-features-now-stable to the existing failOnPrerenderConflict:

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

This looks great, @ematipico !

I think the bulk of the work is going to be figuring out how to make the config reference stuff as concise as possible, and I've left a bunch of suggestions about doing that.

Also, the experimental-flags/csp.mdx page can be completely deleted, and should be removed from the Astro sidebar

@sarah11918
Copy link
Member

Just noting that some of the failed links are on the experimental CSP page (which will be deleted) and I've suggested fixes to the others above. So, those should end up OK!

Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

This review is called "Death by a thousand indentations" 😆

I am going to commit all of these that are just fixing indentation, and let you review the rest so that it's not quite so overwhelming, @ematipico . But, this looks fantastic! I hope you're happy with it!

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 two suggestions to fix the broken links (don't mind Github diff, the lines are not blank 😅 ) and another one to fix the spacing between an API block and the description.

Otherwise, this looks great!

@sarah11918
Copy link
Member

sarah11918 commented Dec 12, 2025

OK, with any luck, this all just works! I removed the experimental pages and deleted its entry from the sidebar. Now we find out if other files were linking here! 😅

@github-actions github-actions bot added the i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help! label Dec 12, 2025
@sarah11918
Copy link
Member

sarah11918 commented Dec 12, 2025

I have added a note for translators to the description:

In some of the adapter pages, the link text may also need updating to remove the word "experimental" where it exists. I have only done English and French in this PR, but we have zh-cn, ja, and ko pages to check. These can be done on this PR, or on the v6 branch itself if this PR is already merged. (Feel free to make direct commits to v6 for this if needed.)

Also, since we don't have #securitycsp in the other languages yet, link check is failing. Since this is the beta branch, we could merge with these anchor links, and they'll just go to the main config reference page until the translations are active. Or, we remove the anchor part from the link. Or we remove the link entirely until config reference is updated and translated. I can't remember what we normally do in this case. For now, I will remove the anchor part of the link in these files so that link checks pass, but these will need updating after the fact.

cc @liruifengv , @jp-knj , and @jsparkdev

@sarah11918 sarah11918 merged commit c94b19b into v6 Dec 12, 2025
11 checks passed
@sarah11918 sarah11918 deleted the feat/csp branch December 12, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.0 i18n Anything to do with internationalization & translation efforts - ask @YanThomas for help!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants