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

Add ServantWai.hs example #13

Merged
merged 2 commits into from Sep 14, 2017

Conversation

Projects
None yet
2 participants
@squidnyan
Contributor

squidnyan commented Sep 9, 2017

It was hard to find how to use wai-cors with Servant because I wasn't able to find an example, so I wrote one. Most "documentation" for this scenario was actually in the form of comments on an issue for Servant's project. I hope this makes things a little easier for others.

@larskuhtz

This comment has been minimized.

Show comment
Hide comment
@larskuhtz

larskuhtz Sep 14, 2017

Owner

Thanks, for contributing the example!

Your example actually demonstrates the usage with any Wai application, not just servant applications.

On the longer term, it would be nice to integrate CORS with a servant specification (on type level) and than use the wai-cors package as implementation.

Owner

larskuhtz commented Sep 14, 2017

Thanks, for contributing the example!

Your example actually demonstrates the usage with any Wai application, not just servant applications.

On the longer term, it would be nice to integrate CORS with a servant specification (on type level) and than use the wai-cors package as implementation.

@larskuhtz larskuhtz merged commit 6613475 into larskuhtz:master Sep 14, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@squidnyan

This comment has been minimized.

Show comment
Hide comment
@squidnyan

squidnyan Sep 14, 2017

Contributor

I hadn't realised it was more generic - I needed CORS for a project using Servant and had to work quite a few things out, so thought I'd show this. Glad it was more generally applicable. If I write anything that might cover CORS @ the type level then I'll be sure to contribute further.

Thanks again for the API.

Contributor

squidnyan commented Sep 14, 2017

I hadn't realised it was more generic - I needed CORS for a project using Servant and had to work quite a few things out, so thought I'd show this. Glad it was more generally applicable. If I write anything that might cover CORS @ the type level then I'll be sure to contribute further.

Thanks again for the API.

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