Cors allow anywhere in debug
This commit is contained in:
parent
fae97efc2d
commit
62f3e0d72f
1 changed files with 2 additions and 2 deletions
|
@ -42,9 +42,9 @@ async fn main() -> std::io::Result<()> {
|
|||
.allowed_methods(vec!["GET", "POST"])
|
||||
.max_age(3600);
|
||||
|
||||
// In debug mode, allow localhost
|
||||
// In debug mode, allow any origin
|
||||
#[cfg(debug_assertions)]
|
||||
let cors = cors.allowed_origin("http://localhost:8080");
|
||||
let cors = cors.allow_any_origin();
|
||||
|
||||
App::new()
|
||||
.wrap(cors)
|
||||
|
|
Loading…
Reference in a new issue