Skip to content

Commit 5ee65d8

Browse files
committed
add to redirect too
1 parent 22c4670 commit 5ee65d8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/runtime/internal/route-rules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const redirect: RouteRuleCtor<"redirect"> = ((m) =>
3030
const strpBase = (m.options as any)._redirectStripBase;
3131
if (strpBase) {
3232
if (!isPathInScope(event.url.pathname, strpBase)) {
33-
throw new HTTPError({ status: 400, message: "Invalid request path" });
33+
throw new HTTPError({ status: 400 });
3434
}
3535
targetPath = withoutBase(targetPath, strpBase);
3636
}
@@ -53,7 +53,7 @@ export const proxy: RouteRuleCtor<"proxy"> = ((m) =>
5353
const strpBase = (m.options as any)._proxyStripBase;
5454
if (strpBase) {
5555
if (!isPathInScope(event.url.pathname, strpBase)) {
56-
throw new HTTPError({ status: 400, message: "Invalid request path" });
56+
throw new HTTPError({ status: 400 });
5757
}
5858
targetPath = withoutBase(targetPath, strpBase);
5959
}

0 commit comments

Comments
 (0)