-
Notifications
You must be signed in to change notification settings - Fork 689
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
How does one add header CORS in Pistache ? #51
Comments
Looking at the set of headers supported, it seems that Access-Control-Allow-Origin is not one of them, so you would have to add it following the documentation http://pistache.io/guide/#defining-your-own-header . I need it for a project too, so once tested, I'll probably send a PR with this header part of the official set of headers supported. |
…fined by default in Pistache. Fixes issue pistacheio#51.
@GuacheSuede As you can see, this is fairly simple, then you just have to add a header as you would normally with Pistache. I think it has its place in the set of headers by default as it can be very useful for jQuery users that would like to use a REST API provided by Pistache (for example). |
Great, Thank you for the pull request. |
|
Hi xinthose |
At the beginning of the route function. So like so:
|
many thanks. this is very helpful. |
Title is question, cannot seem to find any documentation on it. Thanks
The text was updated successfully, but these errors were encountered: