diff --git a/crates/handlers/src/lib.rs b/crates/handlers/src/lib.rs index 9fc65f4a..b22cc971 100644 --- a/crates/handlers/src/lib.rs +++ b/crates/handlers/src/lib.rs @@ -116,10 +116,23 @@ where Encrypter: FromRef, CookieJar: FromRequestParts, { - let mut router = Router::new().route( - "/graphql", - get(self::graphql::get).post(self::graphql::post), - ); + let mut router = Router::new() + .route( + "/graphql", + get(self::graphql::get).post(self::graphql::post), + ) + .layer( + CorsLayer::new() + .allow_origin(Any) + .allow_methods(Any) + .allow_otel_headers([ + AUTHORIZATION, + ACCEPT, + ACCEPT_LANGUAGE, + CONTENT_LANGUAGE, + CONTENT_TYPE, + ]), + ); if playground { router = router.route("/graphql/playground", get(self::graphql::playground));