-
Notifications
You must be signed in to change notification settings - Fork 853
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
Forward all headers (missing http-x-requested-with Headers) #130
Comments
As side note, with the same configuration when the destination server sends back a response 302 -> the proxy send back to the client a 404 error!! What am I doing wrong? |
Probably related to #127 |
Sorry, my mistake, I was not sending the 'x-requested-with' : 'XMLHttpRequest' in the first place, I was expecting Axios to do this automatically but I was wrong. |
This was referenced Jan 22, 2020
This was referenced Dec 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
I'm using the proxy options in webpack configuration.
My webpack dev server is running at
localhost:8888
and my backend is atlocalhost:8000
.What I was expecting is that all the HTTP HEADERS sent to the webpack dev server would have been forwarded to the proxy server at
localhost:8000
Actual behavior
Actually some HTTP HEADERS are missing, at least the one I am interested in, that is:
http-x-requested-with XMLHttpRequest
. This header is never sent to the destination server and I'm wondering if it is by design or a bug.The only way to make this work is to manually add this header in the proxy section of the webpack config
headers: {'http-x-requested-with' : 'XMLHttpRequest' }
Setup
proxy middleware configuration
server mounting
Webpack devserver config
The text was updated successfully, but these errors were encountered: