There was an error while loading. Please reload this page.
1 parent 7425957 commit c947d99Copy full SHA for c947d99
1 file changed
src/functions/redirect.ts
@@ -21,7 +21,7 @@ export async function redirect(
21
let headers = { Location: DEFAULT_TARGET };
22
23
const restOfPath = request.params?.restOfPath;
24
- const urlPath = restOfPath ? `/${restOfPath}` : "/";
+ const urlPath = restOfPath ? `/${restOfPath.replace(/^\/+/, "")}` : "/";
25
const acceptHeader = request.headers.get("Accept") ?? "*/*";
26
const acceptMediaTypes = mediaTypes(acceptHeader);
27
0 commit comments