-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
proxy not work for post #2377
Comments
Please fill in the issue template! And make sure you're authed to the proxy. And see #2128 |
@nhooyr |
@snadn There is no header |
@nhooyr I mean |
@snadn I'm seeing the same issues as you. (Until I get a 502, Socket hang up) I hadn't updated in a long while, and after I did, then I was seeing this issue |
Running an express server and have the same issue trying to get POST request body of types Tried both
|
I have the same problem with a Flask server. Going local to port 5000 on my server it works perfectly, but proxying through code-server by http://code.domain.co.uk/proxy/5000/user/login causes curl and flask to hang until I ctrl-c. This is only happens with POST requests. GET requests work perfectly. The same happens if i access code-server locally by port 8443. I used the network tab of Firefox dev tools to send a request with more control, and instead of a hang I just got a 400 bad request. I disabled auth with Using a breakpoint I found it was on the first line in the route which was |
@nhooyr Do you need more info than what has been posted? |
I managed to fix the issue (I think) but the yarn watch thing gives me a My edited |
If it is helpful, I use linuxserver's builds of code-server. It looks like the proxy issue started between versions 3.6.2 and 3.7.4. Build 3.6.2 will work if you roll back to it. |
Confirmed this, working on a fix! Also added a test to prevent any future breakage in this area! |
This allows the http-proxy package to passthrough the request body correctly. Closes coder#2377
This allows the http-proxy package to passthrough the request body correctly. Closes coder#2377
Any json or urlencoded request bodies were being consumed by body-parser before they could be proxied. That's why requests without Content-Type were proxied correctly as body-parser would not consume their body. This allows the http-proxy package to passthrough the request body correctly in all instances. Closes coder#2377
Fix is at #2609 |
Any json or urlencoded request bodies were being consumed by body-parser before they could be proxied. That's why requests without Content-Type were proxied correctly as body-parser would not consume their body. This allows the http-proxy package to passthrough the request body correctly in all instances. Closes #2377
Any json or urlencoded request bodies were being consumed by body-parser before they could be proxied. That's why requests without Content-Type were proxied correctly as body-parser would not consume their body. This allows the http-proxy package to passthrough the request body correctly in all instances. Closes #2377
POST request body is not proxied to the servers. Maybe the same problem as chimurai/http-proxy-middleware#40
code-server --version
: 3.7.4The text was updated successfully, but these errors were encountered: