-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix: Infer content type with charset in dev and prod #3841
Conversation
🦋 Changeset detectedLatest commit: d0b0ab3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 makes sense to me!
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.
Yep this definitely makes sense, and lines up nicely with the UTF-8 default files get during SSG
text/plain;charset=utf-8
default content type in dev server* fix: add text/plain;charset;utf-8 header in dev * test: ensure content type for body shorthand * chore: changeset * feat: infer content type by pathname * feat: add charset to prod build handler * test: update for charset in prod build test
Context and open questions
Discord comment:
Changes
{ body }
shorthand using mine package (no, this isn't a new dependency)text/plain;charset=utf-8
content type when mime can't be inferredTesting
Add content type test to
ssr-api-route.test.js
Docs
N/A