-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[Blazor] Add vary header to uncompressed endpoints #50246
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
Thanks for your PR, @@javiercn. |
d26840a
to
1ac9995
Compare
1ac9995
to
bd1d43a
Compare
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.
Pull Request Overview
This PR adds a "Vary: Accept-Encoding" header to uncompressed static asset endpoints in Blazor WebAssembly applications. The change helps prevent caching issues where browsers might cache an uncompressed response and serve it even when compression is requested, improving HTTP caching behavior.
- Updates static web asset endpoint configurations to include the Vary header
- Applies to all uncompressed static assets like .dll, .js, .wasm, and other framework files
- Changes are reflected in test baseline files to match the new behavior
Reviewed Changes
Copilot reviewed 13 out of 72 changed files in this pull request and generated no comments.
File | Description |
---|---|
StaticWebAssets_PublishMinimal_Works.Publish.staticwebassets.json | Updated baseline showing Vary header added to all uncompressed endpoints |
StaticWebAssets_HostedApp_ReferencingNetStandardLibrary_Works.Build.staticwebassets.json | Updated baseline showing Vary header added to all uncompressed endpoints |
StaticWebAssets_Build_Hosted_Works.Build.staticwebassets.json | Updated baseline showing Vary header added to all uncompressed endpoints |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
All the endpoints for a given route with multiple representations must have
Vary
applied to it.