Add Content-Type as authorized header
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is failing Details

This commit is contained in:
Lucien Cartier-Tilet 2023-01-26 04:23:12 +01:00
parent c618bd9667
commit 92aed98f90
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
1 changed files with 5 additions and 1 deletions

View File

@ -26,7 +26,11 @@ fn make_cors() -> Result<rocket_cors::Cors, rocket_cors::Error> {
Method::from(HMethod::Get),
Method::from(HMethod::Post),
]),
allowed_headers: AllowedHeaders::some(&["Authorization", "Accept"]),
allowed_headers: AllowedHeaders::some(&[
"Authorization",
"Accept",
"Content-Type",
]),
allowed_origins: match env::var("ORDABOK_HOSTS") {
Ok(val) => {
if val.is_empty() {