api-vcr icon indicating copy to clipboard operation
api-vcr copied to clipboard

Add CORS server option

Open nedjs opened this issue 7 years ago • 1 comments

Allow an optional setting CORS header. Thinking something like --access-origin *

Alternatively just allow the setting of a header: --header "Access-Control-Allow-Origin: *"

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

nedjs avatar Nov 10 '17 08:11 nedjs

Great idea!

Maybe allowing headers to be set in the general case is most useful?

If you do the work I'll take the CR.

I think there's a library that turns a json object into a header string, not sure what that looks like. Or just letting people set it as a free text string, whatever feels right to you.

SimplGy avatar Nov 10 '17 17:11 SimplGy