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

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

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() {