Today, I get a problem with http-proxy-middleware.
show my code follow:
const proxy = require('http-proxy-middleware');
module.exports = function (app) {
app.use(
proxy('/api/weather', {
target: 'https://restapi.amap.com/v3/weather/weatherInfo',
changeOrigin: true,
secure: false,
pathRewrite: {
'^/api/weather': ''
}
})
);
...
and the result of web browser


and the log of server

so how can i fix it?