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

fix: include the protocol when creating HttpIncoming #279

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Conversation

wkillerud
Copy link
Contributor

Noticed that podlets using mount origin from the context didn't get the correct protocol in in HTTPS origins.

https://github.com/podium-lib/context/blob/main/lib/get-mount-origin.js

Turns out the raw request we pass down in the Fastify plugin doesn't include the protocol.

@wkillerud
Copy link
Contributor Author

We perhaps designed this with the intention of a ClientRequest which has the protocol property, but we get an HttpIncomingMessage which doesn't have the protocol.

@wkillerud
Copy link
Contributor Author

This is likely a regression we didn't catch in the interaction between 3.x of this module and 5.x of @podium/utils.

In 4.x of @podium/utils (used by 2.x of this module) we detected the origin protocol with original-url.

@wkillerud wkillerud merged commit efee917 into main Sep 25, 2024
6 checks passed
@wkillerud wkillerud deleted the hook-lifecycle branch September 25, 2024 08:24
github-actions bot pushed a commit that referenced this pull request Sep 25, 2024
## [3.0.11](v3.0.10...v3.0.11) (2024-09-25)

### Bug Fixes

* include the protocol when creating HttpIncoming ([#279](#279)) ([efee917](efee917))
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