Hotfix: fix version delete permissions and CORS allowed methods (#107)

This commit is contained in:
Aeledfyr
2020-11-30 11:45:59 -06:00
committed by GitHub
parent a7be6504a2
commit b3f724c799
2 changed files with 10 additions and 6 deletions

View File

@@ -280,7 +280,7 @@ async fn main() -> std::io::Result<()> {
// Init App
HttpServer::new(move || {
let mut cors = Cors::new()
.allowed_methods(vec!["GET", "POST"])
.allowed_methods(vec!["GET", "POST", "DELETE", "PATCH", "PUT"])
.allowed_headers(vec![http::header::AUTHORIZATION, http::header::ACCEPT])
.allowed_header(http::header::CONTENT_TYPE)
.max_age(3600);