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

Clean way to add ...-allow-origin to non-preflight requests #38

Closed
theashguy opened this issue Mar 25, 2018 · 2 comments
Closed

Clean way to add ...-allow-origin to non-preflight requests #38

theashguy opened this issue Mar 25, 2018 · 2 comments

Comments

@theashguy
Copy link

Hey there guys,

I may have this one completely wrong but by the looks of it the fairing only handles automagically generating the preflight / OPTIONS request and not the correct headers for other request types. Its not obvious to me the idiomatic way to achieve this. I could obviously go through request but I'm adding CORS to an already existing application so this is going to be a long winded task.

Basically wanted to check if there was some kind of exploiting default headers in rocket rather than manually tweaking all the existing code.

Cheers.
Ash.

@lawliet89
Copy link
Owner

There is unfortunately no automagical way to do so. It can be implemented.

May I know your use case? I don't really see why you might want to add those headers to non CORS requets.

@lawliet89
Copy link
Owner

Closing due to lack of response. Please reopen otherwise.

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

No branches or pull requests

2 participants