fix(CORS): do not add "*" as an allowed host
This commit is contained in:
@@ -59,7 +59,9 @@ impl From<CorsSettings> for Cors {
|
|||||||
);
|
);
|
||||||
let mut cors = Self::new();
|
let mut cors = Self::new();
|
||||||
for origin in &val.allowed_origins {
|
for origin in &val.allowed_origins {
|
||||||
cors = cors.allow_origin(origin);
|
if origin != "*" {
|
||||||
|
cors = cors.allow_origin(origin);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cors = cors.allow_methods(vec![
|
cors = cors.allow_methods(vec![
|
||||||
Method::GET,
|
Method::GET,
|
||||||
|
|||||||
Reference in New Issue
Block a user