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

ctx.request.origin is different to request.headers.origin #1492

Closed
trainto opened this issue Jul 24, 2020 · 1 comment
Closed

ctx.request.origin is different to request.headers.origin #1492

trainto opened this issue Jul 24, 2020 · 1 comment

Comments

@trainto
Copy link

trainto commented Jul 24, 2020

I was struggling with CORS setting, and I've found that the ctx.reuqest.origin value is different to ctx.request.headers.origin value.

Client side - https://www.example.com
API server - https://api.example.com

In this situation, ctx.request.headers.origin was https://www.example.com, but ctx.request.origin was https://api.example.com.

Is it intended? I don't know maybe I'm misunderstanding something, but first time I saw the ctx.request.origin, I though it will indicate where the fetch originates from by its naming.

@trainto
Copy link
Author

trainto commented Jul 24, 2020

Sorry to bother.
I've found #1008 already has been discussing about it.

@trainto trainto closed this as completed Jul 24, 2020
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

No branches or pull requests

1 participant