Http-proxy-middleware reverse proxy problem

the address where you want to reverse proxy is http://huaban.com/?page=2
"s reverse proxy setting in nginx is as follows

http://localhost:8099/api?page=2

this is the reverse proxy setting in node

access http://localhost:3300/api?page=2 cannot access the data. How to access the data normally

Mar.14,2021

app.use(proxy('/api',{
  target: HOST,
  changeOrigin: true,
  pathRewrite: {
    '^/api': ''
  }
}))

because all requests are processed directly by app.use ('/', express.static ('static')) , they don't go to the proxy below.

Menu