Skip to content

Conversation

@paro-paro
Copy link

πŸ”— Linked issue

#3501

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR aims to fix the current implementation of the vary response header from the nitro server.

Right now, every request that includes the accept-encoding header will get back a response with vary: accept-encoding despite nitro not serving different content. This should only happen when nitro serves different compressed (on build time) versions of public assets (when the compressPublicAssets config option is enabled).

This PR fixes that and also handles this other related issue #3077, where the vary header is wrongly omitted if the encoding request header is not sent (or if set to a different value than the ones supported by EncodingMap) for compressed assets.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@paro-paro paro-paro requested a review from pi0 as a code owner July 31, 2025 18:58
@vercel
Copy link

vercel bot commented Jul 31, 2025

@paro-paro is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant