-
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
Requests with a body don't work #417
Comments
It turned out that if I don not use the express.json middleware everything works! Edit: By that this ticket is related to #320 |
sarumont
added a commit
to sarumont/http-proxy-middleware
that referenced
this issue
Jul 30, 2020
Things like body-parser can break proxying anything with a body. This checks for that (req.body will become an Object) and streams the body into the proxy request. Fixes chimurai#90, chimurai#320, chimurai#417 - and maybe some more
sarumont
added a commit
to sarumont/http-proxy-middleware
that referenced
this issue
Jan 12, 2021
Things like body-parser can break proxying anything with a body. This checks for that (req.body will become an Object) and streams the body into the proxy request. Fixes chimurai#90, chimurai#320, chimurai#417 - and maybe some more
I guess this fixes this issue :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is this a bug report?
Yes
Steps to reproduce
The request:
http://127.0.0.1/proxy/MY-WEBHOOK-IDENTIFIER
Expected behavior
forward
http://127.0.0.1/proxy/MY-WEBHOOK-IDENTIFIER
tohttps://webhook.site/MY-WEBHOOK-IDENTIFIER
no matter what content:No timeout when requesting on
http://127.0.0.1/proxy/MY-WEBHOOK-IDENTIFIER
with a contentNo timeout when requesting on
http://127.0.0.1/proxy/MY-WEBHOOK-IDENTIFIER
with no contentNo timeout when requesting on
https://webhook.site/MY-WEBHOOK-IDENTIFIER
with or without contentActual behavior
Timeout when requesting on
http://127.0.0.1/proxy/MY-WEBHOOK-IDENTIFIER
with a contentNo timeout when requesting on
http://127.0.0.1/proxy/MY-WEBHOOK-IDENTIFIER
with no contentNo timeout when requesting on
https://webhook.site/MY-WEBHOOK-IDENTIFIER
with or without contentSetup
app.use("/proxy", createProxyMiddleware({ target: "https://webhook.site", pathRewrite: { ["^/proxy"]: "" }, logLevel: "debug", changeOrigin: true }));
client info
OS: Linux Mint 19.3 "Tricia"
User-Agent: PostmanRuntime/7.24.0
target server info
Webhook.site: A free web server to mirror incoming requests
The text was updated successfully, but these errors were encountered: