larskuhtz / wai-cors

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

Content-Type header in CORS failure responses #31

Closed maartenberg closed 2 years ago

maartenberg commented 4 years ago

When wai-cors denies a CORS request the response is given the header Content-Type: text/html; charset-utf-8, as set here:

https://github.com/larskuhtz/wai-cors/blob/7af2f8acff5ddd3557f86d1759c4f6a8ea0ad17b/src/Network/Wai/Middleware/Cors.hs#L531

I believe that this header's value should instead be text/plain; charset=utf-8:

Can this be changed / would a PR that changes this value to text/plain; charset=utf-8 be accepted?