r0man / ring-cors

Ring middleware for Cross-Origin Resource Sharing.
http://github.com/r0man/ring-cors
166 stars 44 forks source link

`Access-Control-Allow-Methods` not always set correctly #33

Open frenchy64 opened 2 years ago

frenchy64 commented 2 years ago

Due to some quirks of HeaderMap, if Access-Control-Allow-Methods is already present in a request, in some cases the the CORS headers are not correctly set.

See test cases in this branch and proposed fix: https://github.com/frenchy64/ring-cors/pull/1/files