Replies: 1 comment 2 replies
-
Could you point out the "strange" parts of the documentation? Here you can find v3 docs and migration steps:
const { legacyCreateProxyMiddleware: createProxyMiddleware, fixRequestBody } = require("http-proxy-middleware")
module.exports = function(app){
app.use('/api1',
createProxyMiddleware({
logger: console,
target: 'http://127.0.0.1:8000',
changeOrigin:true,
on:{
proxyReq: fixRequestBody
}
})
)
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sry to open a new issue on this topic again. I've gone through the old issues but I really don't understand how to do it.
I'm using React 18, axios, to post requests, like this
axios.post("api/blabla", {data:"blabla})
and the post body is not forwarded to server.
I'm using http-proxy-middleware
v3.0 beta1
but the documents are strange so most of the configure file is still v2-styled.this is my
setupProxy.js
:Beta Was this translation helpful? Give feedback.
All reactions