From bb534fae2711ce058a1555cc48f4022278bc4d07 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Wed, 22 Nov 2023 07:08:27 +0800 Subject: [PATCH] fix(webserver): make GET /graphql route an api route (so it's valid through cors) (#858) --- ee/tabby-webserver/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/tabby-webserver/src/lib.rs b/ee/tabby-webserver/src/lib.rs index 4fe3ed3..f0da4ab 100644 --- a/ee/tabby-webserver/src/lib.rs +++ b/ee/tabby-webserver/src/lib.rs @@ -46,11 +46,11 @@ pub async fn attach_webserver( "/graphql", routing::post(graphql::>).with_state(ctx.clone()), ) + .route("/graphql", routing::get(playground("/graphql", None))) .layer(Extension(schema)) .route("/hub", routing::get(ws_handler).with_state(ctx)); let ui = ui - .route("/graphql", routing::get(playground("/graphql", None))) .route("/graphiql", routing::get(graphiql("/graphql", None))) .fallback(ui::handler);