Skip to content

Conversation

@matthewp
Copy link
Contributor

@matthewp matthewp commented Oct 14, 2025

Description (required)

  • Documents the new skew protection feature in the Netlify adapter.

For Astro version: 5.15. See astro PR #14543.

@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit ce800ed
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/68f9cba2b5b6a200088166b7
😎 Deploy Preview https://deploy-preview-12554--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 Oct 14, 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/reference/adapter-reference.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.

Text looks great to me, Matthew! Just see my note about the link to Netlify's docs, though. I can't find anything comparable to link to. (Though I agree, that would be a great link to have there.) Failing that, is there a good general web dev link to skew protection we can use?


<p><Since v="6.6.0" pkg="@astrojs/netlify" /></p>

Netlify's [skew protection](https://docs.netlify.com/deployments/skew-protection/) ensures that users accessing your site during a deployment continue to receive content from the same deploy version. The Netlify adapter automatically configures skew protection for Astro features like actions, server islands, view transitions, and prefetch requests by injecting the current deploy ID into internal requests. This prevents version mismatches between the client and server during active deployments.
Copy link
Member

Choose a reason for hiding this comment

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

This link is a 404 for me, and I can't seem to find anything quickly in Netlify's docs for skew protection. Do you have another link, Matthew?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They haven't published it yet, I'll send you the preview url later.

Copy link
Member

Choose a reason for hiding this comment

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

Perfect! Then no concerns as long as it's live by the time docs publish

Copy link

Choose a reason for hiding this comment

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

The correct link would be https://docs.netlify.com/deploy/deploy-overview/#skew-protection
This is a new section in an existing page, so it won't completely break. But I would aim to get it live on our end soon as you're ready.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @eladroz ! We will be publishing the release today, and I see Matthew has removed the link entirely for now. We are happy to update the page as soon as the page is live, even if it's not included at time of publishing! We'll try to remember, but you're welcome to make a PR to this page directly at any time once the Netlify section is live on the page!

@sarah11918 sarah11918 added 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! labels Oct 15, 2025
@sarah11918 sarah11918 added this to the 5.15.0 milestone Oct 15, 2025
@sarah11918
Copy link
Member

sarah11918 commented Oct 16, 2025

Also tagging in @ArmandPhilippot to ensure that the new internalFetchHeaders is properly added to the Adapter API reference page as necessary!

@ArmandPhilippot
Copy link
Member

Oh, good catch! Yeah, we'll need to update the AstroAdapter interface in Building an Adapter once the name has been decided.

We could also describe the new property below, in "The properties are:" but now I'm checking that I see we don't describe all the AstroAdapter properties there. So, I guess this is not necessary right now.
We may want to revisit this section later to improve consistency in how we describe the API and because the code snippet is pretty big! I'll try to come up with a suggestion in another PR.

@sarah11918
Copy link
Member

Yeah, this page predates any of your involvement, Armand. It should totally be in a proper "Properties" section or something. But, first thing's first! 😅

Add `client` property with `internalFetchHeaders` option to the AstroAdapter interface documentation. This enables adapters like Netlify to inject headers into Astro's internal fetch calls for features like Actions, View Transitions, Server Islands, and Prefetch requests.
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.

LGTM!

@sarah11918 sarah11918 added the Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! label Oct 17, 2025
Add documentation for the `assetQueryParams` property in the `client` configuration. This allows adapters to append query parameters to all asset URLs (images, stylesheets, scripts, etc.), which is useful for tracking deployment versions or other metadata.
@sarah11918
Copy link
Member

Just noting that the implementation PR has updated to include a change to how skew protection is implemented in the vercel adapter (now using the new Adapter API options), but we already do document skew protection for the Vercel adapter and nothing affects what's currently documented.

So, even though the astro PR includes some Vercel adapter stuff, this PR is fine to simply update the Adapter API reference and Netlify docs!

@sarah11918 sarah11918 changed the base branch from main to 5.15.0 October 23, 2025 06:31
@sarah11918 sarah11918 merged commit acc1d78 into 5.15.0 Oct 23, 2025
9 of 10 checks passed
@sarah11918 sarah11918 deleted the netlify-skew-protection branch October 23, 2025 06:38
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