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

Akka HTTP: document / point to community / show CORS #118

Open
ktoso opened this Issue Sep 8, 2016 · 4 comments

Comments

Projects
None yet
1 participant

@ktoso ktoso added this to the http-backlog milestone Sep 8, 2016

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Sep 8, 2016

Member

Comment by kukido
Friday Oct 09, 2015 at 16:32 GMT


Found this tickets during my research on adding CORS for one of our projects. Is the idea here to add CORS support to the library or just describe how it can be done?

Member

ktoso commented Sep 8, 2016

Comment by kukido
Friday Oct 09, 2015 at 16:32 GMT


Found this tickets during my research on adding CORS for one of our projects. Is the idea here to add CORS support to the library or just describe how it can be done?

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Sep 8, 2016

Member

Comment by ktoso
Friday Oct 09, 2015 at 18:48 GMT


As a first step document, however if we deep it needed enough this one I think we may end up pulling in.
I think someone in the community has it implemented and shared on akka-user already: https://groups.google.com/forum/#!topic/akka-user/5RCZIJt7jHo so you can use that for now.

Any feedback about if that impl seems to be working fine or is not enough etc would be excellent, thanks!

Member

ktoso commented Sep 8, 2016

Comment by ktoso
Friday Oct 09, 2015 at 18:48 GMT


As a first step document, however if we deep it needed enough this one I think we may end up pulling in.
I think someone in the community has it implemented and shared on akka-user already: https://groups.google.com/forum/#!topic/akka-user/5RCZIJt7jHo so you can use that for now.

Any feedback about if that impl seems to be working fine or is not enough etc would be excellent, thanks!

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Sep 8, 2016

Member

Comment by lomigmegard
Wednesday Mar 16, 2016 at 21:36 GMT


I have been working on a CORS implementation recently and wanted to share it here.

https://github.com/lomigmegard/akka-http-cors

It follows the recommendation from the W3C (https://www.w3.org/TR/cors/), defining a new cors directive that enables cross origin requests. I also had to create a new Rejection and a couple of helper classes. There are definitely some implementation choices that can be discussed though.

Let me know if you would be interested in having this published to maven. Also do you think this would benefit the core project? I can work on a pull request if yes.

Compared to the other existing directives, this one is more complex and requires multiple settings. The CORS mechanism is not a core feature of http and as such should perhaps not be in akka-http. However, it is a very common use case when building APIs and a simplistic implementation can easily be full of bugs.

Member

ktoso commented Sep 8, 2016

Comment by lomigmegard
Wednesday Mar 16, 2016 at 21:36 GMT


I have been working on a CORS implementation recently and wanted to share it here.

https://github.com/lomigmegard/akka-http-cors

It follows the recommendation from the W3C (https://www.w3.org/TR/cors/), defining a new cors directive that enables cross origin requests. I also had to create a new Rejection and a couple of helper classes. There are definitely some implementation choices that can be discussed though.

Let me know if you would be interested in having this published to maven. Also do you think this would benefit the core project? I can work on a pull request if yes.

Compared to the other existing directives, this one is more complex and requires multiple settings. The CORS mechanism is not a core feature of http and as such should perhaps not be in akka-http. However, it is a very common use case when building APIs and a simplistic implementation can easily be full of bugs.

@ktoso

This comment has been minimized.

Show comment
Hide comment
@ktoso

ktoso Sep 8, 2016

Member

Comment by ktoso
Thursday May 19, 2016 at 01:16 GMT


Hi @lomigmegard, sorry that this issue fell through the cracks!
Yes I think it would be pretty cool if we could point towards your project in the official docs even - would you like to submit a PR adding it to the docs?

Member

ktoso commented Sep 8, 2016

Comment by ktoso
Thursday May 19, 2016 at 01:16 GMT


Hi @lomigmegard, sorry that this issue fell through the cracks!
Yes I think it would be pretty cool if we could point towards your project in the official docs even - would you like to submit a PR adding it to the docs?

@ktoso ktoso added 1 - triaged and removed t:http labels Sep 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment