grape-swagger icon indicating copy to clipboard operation
grape-swagger copied to clipboard

Access-Control-Allow-Origin works only for group 200 codes

Open pinkynrg opened this issue 7 years ago • 1 comments

The documentation says:

Alternatively you can set CORS headers in a Grape before block.

before do header['Access-Control-Allow-Origin'] = '' header['Access-Control-Request-Method'] = '' end

Doesn't this work only for 200 http codes? What about all 400 codes? If this is correct, shouldn't be added in the documentations?

pinkynrg avatar Nov 10 '17 16:11 pinkynrg

Probably. With specs.

dblock avatar Nov 10 '17 20:11 dblock