We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 04e38d3 + 1575d32 commit b1d15e4Copy full SHA for b1d15e4
src/index.ts
@@ -46,12 +46,12 @@ const httpProxyMiddleware = async (
46
if (pathRewrite) {
47
req.url = rewritePath(req.url as string, pathRewrite);
48
}
49
- if (["POST", "PUT"].indexOf(req.method as string) >= 0 && typeof req.body === "object") {
+ if (["POST", "PUT", "PATCH"].indexOf(req.method as string) >= 0 && typeof req.body === "object") {
50
req.body = JSON.stringify(req.body);
51
52
proxy
53
.once("proxyReq", ((proxyReq: any, req: any): void => {
54
- if (["POST", "PUT"].indexOf(req.method as string) >= 0 && typeof req.body === "string") {
+ if (["POST", "PUT", "PATCH"].indexOf(req.method as string) >= 0 && typeof req.body === "string") {
55
proxyReq.write(req.body);
56
proxyReq.end();
57
0 commit comments