larskuhtz / wai-cors

A Haskell implementation of Cross-Origin resource sharing (CORS) for Wai
MIT License
26 stars 13 forks source link

Modify methods used in simpleCorsResourcePolicy #24

Closed akilegaspi closed 5 years ago

akilegaspi commented 5 years ago

I find it that most people build APIs when using wai-cors hence modifying the request to add the other methods essential.

larskuhtz commented 5 years ago

You are free to use the proposed CORS policy when serving your APIs, but it would require the client to make preflight requests and would thus not be a policy for simple cross origin requests. Since this policy would be specific to your API, I think, it is outside the scope of this package.

akilegaspi commented 5 years ago

Thank you for the clarification @larskuhtz

larskuhtz commented 5 years ago

Thanks for contributing to the package!