fix: typings fix for Response.redirect call (#81)

Co-authored-by: Boaz Blake <BBlake@goempyrean.com>
This commit is contained in:
Boaz Blake
2021-12-28 22:15:03 +01:00
committed by GitHub
co-authored by Boaz Blake
parent c436705b96
commit 64da4005bb
+1 -1
View File
@@ -148,7 +148,7 @@ export class ServerContext {
const url = new URL(req.url);
if (url.pathname.length > 1 && url.pathname.endsWith("/")) {
url.pathname = url.pathname.slice(0, -1);
return Response.redirect(url, 307);
return Response.redirect(url.href, 307);
}
const handle = () => Promise.resolve(inner(req));
return middleware.handler(req, handle);