Skip to content

Commit

Permalink
Strip the pathPrefix from basic proxy requests (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
stramel authored Jun 1, 2020
1 parent ad9b6d8 commit 83240f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,14 @@ function normalizeProxies(proxies: RawProxies): Proxy[] {
return [
pathPrefix,
{
on: {},
on: {
proxyReq: (proxyReq, req) => {
proxyReq.path = req.url.replace(pathPrefix, '')
}
},
target: options,
ignorePath: true,
changeOrigin: true,
secure: false
},
];
});
Expand Down

0 comments on commit 83240f5

Please sign in to comment.