Skip to content

Case insensitive proxyHeaders #12

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

Closed
mheppner opened this issue Sep 1, 2017 · 2 comments
Closed

Case insensitive proxyHeaders #12

mheppner opened this issue Sep 1, 2017 · 2 comments

Comments

@mheppner
Copy link

mheppner commented Sep 1, 2017

I apologize in advance if I'm missing something here, but when the frontend headers get copied into to the global headers, this is going to potentially have duplicate headers (Accept vs accept), right?

I noticed some of my requests on the Nuxt server side are being sent back from my Django API as HTML. After turning on debug, I see the headers as:

headers:
      { Accept: 'application/json, text/plain, */*',
        accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
        ...

I'm guessing the lowercase accept is the one being forwarded from the browser, but the capitalized Accept is the one I actually want.

Should there be a better way to merge in the headers from the incoming request? Or maybe just the accept header should be ignored?

This bug report is available on Nuxt.js community (#c14)
@pi0
Copy link
Member

pi0 commented Sep 6, 2017

Hi. Sorry for late response. Problem is now fixed by removing accept header.

@mheppner
Copy link
Author

mheppner commented Sep 7, 2017

No problem, thank you :)

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

No branches or pull requests

2 participants