fix: cors needs to be attached

This commit is contained in:
Paul Makles
2022-06-07 17:18:16 +01:00
parent d660127c14
commit 3de7ee4c7b
3 changed files with 12 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ use std::str::FromStr;
pub use rocket_cors::catch_all_options_routes;
use rocket_cors::{AllowedOrigins, Cors};
pub fn fairing() -> Cors {
pub fn new() -> Cors {
rocket_cors::CorsOptions {
allowed_origins: AllowedOrigins::All,
allowed_methods: [