-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
req.origin should display the origin
header if it exists, not the current hostname
#1008
Comments
|
I think this would be a good change, |
If this is done (thus semver-major bump), maybe consider other #904, and dropping https://github.com/koajs/koa/blob/master/lib/application.js#L107? @jonathanong if you'd like to proceed with a new version, maybe create a v3 milestone as "todos"? edit oh, the milestone already existed! |
👍 |
What's the expected behaviour here?
|
Don't agree with return |
|
Yeah, it was very confusing to me, had to fallback to |
So let me try to understand that. If I want to compose links in my response, that the client can directly follow I have to use the origin header? Is it always guaranteed to be set? |
why i use baseURl 127.0.0.1:port/xxxxxxxx in ssr get data, get hostname is { localhost: port } just equal the url .......... |
I agree. origin just should indicate where a fetch originates from. Not the host to which the request is being sent. |
How is this still not fixed, it's such a little change... |
This is a problem for me to |
It is a trivial change why help is wanted? May I help? |
@siakc please help... this is above my ability, but also need this. |
koa/lib/request.js
Line 95 in aaac09a
what do you all think? this would be a breaking change
The text was updated successfully, but these errors were encountered: