Skip to content

Commit 73d639a

Browse files
authored
Simplify the sandbox module (#57)
1 parent 4c38647 commit 73d639a

File tree

1 file changed

+2
-5
lines changed
  • apollo-execution-ktor/src/commonMain/kotlin/com/apollographql/execution/ktor

1 file changed

+2
-5
lines changed

apollo-execution-ktor/src/commonMain/kotlin/com/apollographql/execution/ktor/main.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,11 @@ fun Application.apolloSubscriptionModule(
137137

138138
fun Application.apolloSandboxModule(
139139
title: String = "API sandbox",
140-
sandboxPath: String = "/sandbox",
141140
graphqlPath: String = "/graphql",
141+
sandboxPath: String = "/",
142142
) {
143143
routing {
144-
get(Regex("/sandbox/?")) {
145-
call.respondRedirect(call.url { path("/sandbox/index.html") }, permanent = true)
146-
}
147-
get("$sandboxPath/index.html") {
144+
get(sandboxPath) {
148145
val initialEndpoint = call.url {
149146
/**
150147
* Trying to guess if the client connected through HTTPS

0 commit comments

Comments
 (0)