From 85c0bef8255ea63c5c42f0ffbbcc23828fea4461 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Wed, 23 Jul 2025 17:50:41 +0200 Subject: [PATCH] Simplify the sandbox module --- .../kotlin/com/apollographql/execution/ktor/main.kt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apollo-execution-ktor/src/commonMain/kotlin/com/apollographql/execution/ktor/main.kt b/apollo-execution-ktor/src/commonMain/kotlin/com/apollographql/execution/ktor/main.kt index 6ddc769..cf564c2 100644 --- a/apollo-execution-ktor/src/commonMain/kotlin/com/apollographql/execution/ktor/main.kt +++ b/apollo-execution-ktor/src/commonMain/kotlin/com/apollographql/execution/ktor/main.kt @@ -137,14 +137,11 @@ fun Application.apolloSubscriptionModule( fun Application.apolloSandboxModule( title: String = "API sandbox", - sandboxPath: String = "/sandbox", graphqlPath: String = "/graphql", + sandboxPath: String = "/", ) { routing { - get(Regex("/sandbox/?")) { - call.respondRedirect(call.url { path("/sandbox/index.html") }, permanent = true) - } - get("$sandboxPath/index.html") { + get(sandboxPath) { val initialEndpoint = call.url { /** * Trying to guess if the client connected through HTTPS