Skip to content

feat: document experimental static headers #11971

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

Merged
merged 13 commits into from
Jul 3, 2025
Merged

Conversation

ematipico
Copy link
Member

Description (required)

This PR adds documentation of experimentalStaticHeaders for the Node.js adapter and Netlify adpater.

For Astro version: 5.11. See astro PR #13972.

@ematipico ematipico added this to the 5.11.0 milestone Jul 2, 2025
@ematipico ematipico added 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! labels Jul 2, 2025
Copy link

netlify bot commented Jul 2, 2025

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 2343321
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/6866614e70b58c0008f8f40c
😎 Deploy Preview https://deploy-preview-11971--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.

@sarah11918 sarah11918 added the add new content Document something that is not in docs. May require testing, confirmation, or affect other pages. label Jul 2, 2025
@astrobot-houston
Copy link
Contributor

astrobot-houston commented Jul 2, 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.
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.

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.

OK, this probably needs correcting, but I tried to make this sound first, a bit generic, and then, use CSP as an example of when/how it's used. Lists with one item always feel weird, so maybe we can get around that! 😂

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 noticed two typo, and I wonder if experimentalStaticHeaders is in the right place for the Netlify adapter.

We are not excluding/including files but setting custom CSP directives per page, right? So, we could use an h3 instead of an h4 but then, this heading could be inconsistent with others under Usage. Should we have something like the following?

## Usage
...
### Custom headers for prerendered pages
Some intro?
#### `experimentalStaticHeaders`
The current content.

Co-authored-by: Armand Philippot <git@armand.philippot.eu>
@ematipico ematipico self-assigned this Jul 2, 2025
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
sarah11918 and others added 2 commits July 2, 2025 11:33
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
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.

Looks great, thank you @ematipico ! This will be good to merge tomorrow!

@ematipico
Copy link
Member Author

@sarah11918 and @ArmandPhilippot The commit dded21a (#11971) update the Vercel adapter with the same feature

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.

Only a missing p tag, otherwise LGTM!

@sarah11918 sarah11918 changed the base branch from main to 5.11.0 July 3, 2025 10:55
@sarah11918 sarah11918 merged commit 51917f9 into 5.11.0 Jul 3, 2025
9 of 10 checks passed
@sarah11918 sarah11918 deleted the feat/static-headers branch July 3, 2025 10:56
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-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.

4 participants