Fix redirect with basepath

Fix #589
This commit is contained in:
Thomas Ghysels
2019-03-03 10:40:49 +01:00
parent 9522cb4539
commit 13b64cd1bb
2 changed files with 3 additions and 3 deletions

View File

@@ -177,7 +177,7 @@ export function get_page_handler(
try {
if (redirect) {
const location = URL.resolve(req.baseUrl || '/', redirect.location);
const location = URL.resolve((req.baseUrl || '') + '/', redirect.location);
res.statusCode = redirect.statusCode;
res.setHeader('Location', location);