mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
Merge pull request #591 from thgh/redirect-basepath
Fix redirect with basepath
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user