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

[Feature Request] Cross Origin support similar to flask-cors #296

Closed
kamaravichow opened this issue Oct 27, 2022 · 11 comments
Closed

[Feature Request] Cross Origin support similar to flask-cors #296

kamaravichow opened this issue Oct 27, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@kamaravichow
Copy link

kamaravichow commented Oct 27, 2022

Desired Behavior
Cross-Origin Request management for web apps as browsers block them if they are hosted on a different domain

Alternatives
We could manually add the headers

@sansyrox
Copy link
Member

Thanks for the feature request @kamaravichow .

Do you happen to know the exact headers required?

@sansyrox sansyrox changed the title Cross Origin support similar to flask-cors [Feature Request] [Feature Request] Cross Origin support similar to flask-cors Oct 27, 2022
@kamaravichow
Copy link
Author

kamaravichow commented Oct 27, 2022

'Access-Control-Request-Method'
'Access-Control-Request-Headers'
'Access-Control-Allow-Origin'
'Access-Control-Allow-Methods'
'Access-Control-Allow-Headers'
'Access-Control-Expose-Headers'
'Access-Control-Allow-Credentials'
'Access-Control-Max-Age'

These are a few important ones that I use in my APIs

@sansyrox
Copy link
Member

@kamaravichow , these are request headers right?

@kamaravichow
Copy link
Author

kamaravichow commented Oct 27, 2022

And the response headers should contain this particular header to allow all the origins

Access-Control-Allow-Origin: *

@suhailmalik07
Copy link
Contributor

@sansyrox, I can pick this up. If it's okay.
have a question regarding approach.

Flask uses flask-cors lib.

Which will be preferable creating a new lib(like flask-cors) or extending in same code-base?

@sansyrox
Copy link
Member

sansyrox commented Oct 29, 2022

Hey @suhailmalik07 👋

Thank you. Since almost every developer uses cors, I think having it in our codebase makes sense.

@suhailmalik07
Copy link
Contributor

Thanks for clarifying, I'm picking this up then.

@sansyrox
Copy link
Member

sansyrox commented Nov 5, 2022

@suhailmalik07 , do let me know if you require any help from my end. :D

@suhailmalik07
Copy link
Contributor

Hey @sansyrox, Thanks for letting me know. Sorry, but I'm currently stuck with something else. If anyone else wants to pick this up, that will be okay. It will take me some time.

@Fazatholomew
Copy link

Hey @sansyrox, may I take this one? I am new to open source contribution but have coded in Python for a while. Rust, not so much. I want to discuss the approach for this. Where should I do that?

@AntoineRR AntoineRR added the enhancement New feature or request label Feb 16, 2023
@sansyrox
Copy link
Member

sansyrox commented Jun 2, 2023

Hi @Fazatholomew 👋

Apologies. This missed my eye. This issue has been addressed already. :(

However, feel free to pickup another issue. Let me know if you need any help 😄

@sansyrox sansyrox closed this as completed Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants