ruby-grape / ruby-grape/grape-swagger

Duplicate Access-Control-Allow-Origin

Open
#333 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

new feature question swagger-1.2
Dominant language
Ruby
Stars
1.1k
Forks
479
Avg merge
2d 14h
Merged PRs (30d)
6

Description

Hey, in doc_methods.rb you're defining some response headers. Is it possible to remove them, because normally i want to setup all required headers in my app or proxy server. Nginx will add a duplicate in this case, which will break all the stuff.

Please checkout these sections.
Code part 1
Code part 2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in lib/grape-swagger/doc_methods.rb at the two linked sections, lines 427-428 and 482-483, and inspect how the response headers are defined. Confirm the expected behavior for an app or proxy that supplies its own headers; done means the duplicate Access-Control-Allow-Origin header is no longer produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
nginx, ruby
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.