From 86cc2ea889c254b94ef9974da821ad8782b77f37 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 18 Jul 2022 14:04:13 +0200 Subject: [PATCH] add cors --- src/lib/scel_api/src/lib.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/lib/scel_api/src/lib.rs b/src/lib/scel_api/src/lib.rs index ec2bbe6..ab7b544 100644 --- a/src/lib/scel_api/src/lib.rs +++ b/src/lib/scel_api/src/lib.rs @@ -54,9 +54,14 @@ impl Server { .data(app) .finish(); - let cors = vec!["http://localhost:3000" - .parse() - .expect("Could not parse url")]; + let cors = vec![ + "http://localhost:3000" + .parse() + .expect("Could not parse url"), + "https://scel.front.kjuulh.io" + .parse() + .expect("Could not parse url"), + ]; let app = Router::new() .route("/", routing::get(graphql_playground).post(graphql_handler))