Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue comeback duplicate headers because of header name case #259

Open
eugene-ruby opened this issue Mar 7, 2023 · 3 comments
Open

issue comeback duplicate headers because of header name case #259

eugene-ruby opened this issue Mar 7, 2023 · 3 comments

Comments

@eugene-ruby
Copy link
Contributor

eugene-ruby commented Mar 7, 2023

I use rake version 2.2.6.2 and don't update because have dependencies

`
Bundler could not find compatible versions for gem "rack":
In Gemfile:
rack (~> 3)

rails (~> 6.1.7.2) was resolved to 6.1.7.2, which depends on
  actionpack (= 6.1.7.2) was resolved to 6.1.7.2, which depends on
    rack (~> 2.0, >= 2.0.9)

`

But after merged PR
#252

I get duplicate headers

curl -I 'http://localhost:3000/api-docs' -H 'Origin: http://127.0.0.1:3001'
HTTP/1.1 200 OK
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
access-control-expose-headers:
access-control-max-age: 7200
Access-Control-Allow-Origin: *
Access-Control-Request-Method: *
Content-Type: application/json
Cache-Control: no-cache
X-Request-Id: ee0ae55d5e1846be8462e897bbc892ea
X-Runtime: 0.120744
x-rack-cors-original-access-control-allow-origin: *
x-rack-cors-original-access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
x-rack-cors-original-access-control-expose-headers:
x-rack-cors-original-access-control-max-age: 7200
vary: Origin
x-rack-cors: hit
Content-Length: 0

I suggest checking version rake and call Rack::Utils::HeaderHash or simple return h

eugene-ruby pushed a commit to eugene-ruby/rack-cors that referenced this issue Mar 7, 2023
Fix duplicate headers because of header name case with
@eugene-ruby
Copy link
Contributor Author

please see PR #260

@Xeej
Copy link

Xeej commented Mar 14, 2023

i have same problem. troubles to use swagger ui
image
image

cyu pushed a commit that referenced this issue Mar 16, 2023
@johnnyshields
Copy link

This ticket can be closed as fix is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants