ruby-grape / ruby-grape/grape-swagger
Access-Control-Allow-Origin works only for group 200 codes
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 479
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 6
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the documented Grape before block and the surrounding CORS guidance. Verify whether the shown headers apply to error responses such as 400 codes, then update the documentation to state the supported behavior and any required configuration. Done means the guidance answers the question for both successful and error responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100