Fix the redirect.
This commit is contained in:
parent
87a3cb8aa7
commit
71d2b3dc91
|
@ -75,8 +75,8 @@ server.use(
|
|||
proxy("nginx", {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
userResHeaderDecorator(headers, userReq, userRes, proxyReq, proxyRes) {
|
||||
if (!userReq.path.endsWith("/")) {
|
||||
userRes.redirect(307, `${userReq.path}/`);
|
||||
if (!userReq.url.endsWith("/")) {
|
||||
userRes.redirect(307, `${userReq.url}/`);
|
||||
}
|
||||
if (headers.location && headers.location.match(startsWithSkylinkRegExp)) {
|
||||
headers.location = headers.location.replace(
|
||||
|
|
Reference in New Issue