Skip to content

Commit 4c07678

Browse files
committed
fix: correctly return Response.redirect for trailing slash enforcement
1 parent 5901c23 commit 4c07678

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ export const sqliteAdmin = ({ dbPath, prefix = "/admin", configPath = "./sqlite-
7575
.onBeforeHandle(({ path, set, session, body }) => {
7676
// Enforce trailing slash for root to ensure relative assets work
7777
if (path === prefix) {
78-
set.redirect = prefix + '/';
79-
return;
78+
return Response.redirect(prefix + '/', 301);
8079
}
8180

8281
// Permitir assets e HTML principal

0 commit comments

Comments
 (0)