Update proxy path passthrough documentation
Includes updated create-react-app docs. Closes #2565
This commit is contained in:
@ -9,8 +9,7 @@ proxy.on("error", (error, _, res) => {
|
||||
})
|
||||
|
||||
// Intercept the response to rewrite absolute redirects against the base path.
|
||||
// Is disabled when the request has no base path which means --proxy-path-passthrough has
|
||||
// been enabled.
|
||||
// Is disabled when the request has no base path which means /absproxy is in use.
|
||||
proxy.on("proxyRes", (res, req) => {
|
||||
if (res.headers.location && res.headers.location.startsWith("/") && (req as any).base) {
|
||||
res.headers.location = (req as any).base + res.headers.location
|
||||
|
Reference in New Issue
Block a user