Skip to content

Commit a4229eb

Browse files
Update src/index.ts
Co-authored-by: Jozef Mikuláš <jmikulas.sk@gmail.com>
1 parent 4d48235 commit a4229eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const swagger = async <Path extends string = '/swagger'>(
8585
const scalarConfiguration: ReferenceConfiguration = {
8686
spec: {
8787
...scalarConfig.spec,
88-
url: `${request.url}/json`
88+
url: `${new URL(request.url).pathname.replace(/\/$/, "")}/json`
8989
},
9090
...scalarConfig,
9191
// so we can showcase the elysia theme

0 commit comments

Comments
 (0)