-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Document skew protection in Netlify adapter #12554
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
Conversation
✅ Deploy Preview for astro-docs-2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
sarah11918
left a comment
There was a problem hiding this 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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!
|
Also tagging in @ArmandPhilippot to ensure that the new |
|
Oh, good catch! Yeah, we'll need to update the 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 |
|
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.
…nto netlify-skew-protection
sarah11918
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.
|
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! |
Description (required)
For Astro version:
5.15. See astro PR #14543.