From a4229eb6ac1c93f3ecb9686d03fee08f93789a39 Mon Sep 17 00:00:00 2001 From: Saurabh Bhalerao Date: Fri, 21 Feb 2025 16:34:51 +0530 Subject: [PATCH] Update src/index.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jozef Mikuláš --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 437729d..fbf4d26 100644 --- a/src/index.ts +++ b/src/index.ts @@ -85,7 +85,7 @@ export const swagger = async ( const scalarConfiguration: ReferenceConfiguration = { spec: { ...scalarConfig.spec, - url: `${request.url}/json` + url: `${new URL(request.url).pathname.replace(/\/$/, "")}/json` }, ...scalarConfig, // so we can showcase the elysia theme