-
Notifications
You must be signed in to change notification settings - Fork 327
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 headers on oxygen #1201
Fix headers on oxygen #1201
Conversation
We detected some changes in |
Object.entries(headers).forEach(([key, value]) => | ||
response.setHeader(key, value) | ||
Object.entries((headers as any).raw()).forEach(([key, value]) => | ||
response.setHeader(key, value as string) |
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.
writeHeadToServerResponse
only executes in node, because response
is a node response object. So using .raw()
should be fine row now, though a later version of node-fetch or undici might need to use something else.
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.
Nice!
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.
Nice! I was just looking at this and wondering why they are all slightly different
* v1.x-2022-07: (95 commits) [ci] release v1.x-2022-07 (#1170) Try ignoring hello-world to see if it will get bumped Don't consider examples part of the workspace (#1202) Fix headers on oxygen (#1201) Add bot user agents for Seoradar and Adresults, resolves #1199 (#1200) Fix changeset updates to docker deploy documentation to resolve run issues (#1196) Upgrade body-parser (#1162) Fix path for deployments Adds ability to add more than one cookie per response (#1161) Move Demo Store to templates folder (#1132) Avoid additional div element (#1191) Whoops this should only be patch Adds preconnect <link> for CDN (#1160) Bump ejs from 3.1.6 to 3.1.7 (#1147) Fix scroll restoration when server props are changed (#1152) Typo Fixes #1165 by making a missing alt tag a console warning (#1167) Remove concurrency directive for Oxygen deployments Fix hydrogen-ui dev and build issues (#1169) ...
Make sure that
headers.raw()
is only executed in node environments. Pass around aHeaders
instance instead of an object where possible.Before submitting the PR, please make sure you do the following:
fixes #123
)yarn changeset add
if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning