From 9f28838b9b442c9f3e0e5b3b3525300676834c71 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 5 Apr 2021 23:39:10 +0200 Subject: chore: make CLIENT env mandatory --- src/main.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 6ac5d2b..865a445 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,10 +43,7 @@ async fn main() -> std::io::Result<()> { .wrap(middleware::Logger::default()) .wrap( Cors::default() - .allowed_origin( - &env::var("CLIENT") - .unwrap_or("http://localhost:8080".to_string())[..] - ) + .allowed_origin(&env::var("CLIENT").unwrap()) .allowed_methods(vec!["GET", "POST", "DELETE"]) .allowed_headers(vec![ header::AUTHORIZATION, -- cgit v1.2.3-18-g5258