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

When allowed origins are configured, it blocks even same origin requests #50

Open
haneul opened this issue Oct 18, 2019 · 2 comments
Open
Assignees
Labels

Comments

@haneul
Copy link

haneul commented Oct 18, 2019

Hello!
I'm trying to use your library to apply cors in akka-http.

When I configured with
cors(settings) { route }
and settings includes allowedOrigins, it seems that the requests from the same origin also be blocked with invalidOrigin rejection. Is there a good way to filter that out?

@lomigmegard
Copy link
Owner

Hi!

Could you provide an example request/response and the full settings you are using?

akka-http is not aware of its "same" origin and treat it as any other origin.

@lomigmegard lomigmegard self-assigned this Nov 5, 2019
@haneul
Copy link
Author

haneul commented Nov 18, 2019

so let's say we run the akka server on
https://10.0.1.1

and have allowed origin with https://10.0.1.2
then when you access https://10.0.1.1 and it makes XHR to the its own APIs, it was rejected from akka-cors as you mentioned that it's not aware of its same origin, which seemed weird to me.

Repository owner deleted a comment from synchrovision Jan 24, 2024
Repository owner deleted a comment from synchrovision Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@lomigmegard @haneul and others