localmed / api-mock

Creates a mock server based on an API Blueprint
MIT License
496 stars 58 forks source link

Dynamically allow all CORS requests by echoing back requested headers #25

Open jnicklas opened 9 years ago

jnicklas commented 9 years ago

Instead of hard-coding a list of headers, we simply echo back the requested headers. This way, all headers are permitted. Same thing with the request method.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same when pulling 70ae919ca81a7d7ad2af407a529f38e48856166e on elabs:allow-all-cors-headers into 7826d0477e0e3813b1fe2ac7a596be33f7be8b62 on localmed:master.