diff --git a/src/config/mod.rs b/src/config/mod.rs index b79f3a9..1bde5a1 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -57,8 +57,12 @@ pub mod init { _ => { // Development (default): Allow localhost origins cors.allow_origin(vec![ - "http://localhost:9081".parse().unwrap(), - "http://127.0.0.1:9081".parse().unwrap(), + format!("http://localhost:{}", super::super::host::PORT) + .parse() + .unwrap(), + format!("http://127.0.0.1:{}", super::super::host::PORT) + .parse() + .unwrap(), "http://localhost:4200".parse().unwrap(), "http://127.0.0.1:4200".parse().unwrap(), ])