Skip to content
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

feat: preserve prerendered asset content-type header #1587

Merged
merged 3 commits into from
Aug 16, 2023
Merged

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #1586

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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 preserves content-type header and allows user overrides. We only store metadata if the content type differs from the one we would infer in the public-assets plugin.

We might in future support inferring more things, perhaps caching headers?

πŸ“ Checklist

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

@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #1587 (5de0d06) into main (a90a1b9) will decrease coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1587      +/-   ##
==========================================
- Coverage   76.23%   76.17%   -0.06%     
==========================================
  Files          76       76              
  Lines        7788     7799      +11     
  Branches      777      778       +1     
==========================================
+ Hits         5937     5941       +4     
- Misses       1849     1855       +6     
- Partials        2        3       +1     
Files Changed Coverage Ξ”
src/prerender.ts 86.05% <100.00%> (+0.30%) ⬆️
src/rollup/plugins/public-assets.ts 92.68% <100.00%> (ΓΈ)
src/types/nitro.ts 100.00% <100.00%> (ΓΈ)

... and 2 files with indirect coverage changes

@pi0 pi0 merged commit d25bf26 into main Aug 16, 2023
8 checks passed
@pi0 pi0 deleted the feat/asset-content-type branch August 16, 2023 10:02
@pi0 pi0 mentioned this pull request Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

preserve headers / content type for prerendered routes
2 participants