1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

fix: allow authorization in Access-Control-Request-Headers (#88)

* fix: allow authorization in Access-Control-Request-Headers

* chore: fix clippy style

* style: use constant version of Authorization header

* chore: fix code style with cargo fmt

Co-authored-by: Quentin Gliech <quenting@element.io>
This commit is contained in:
Hugh Nimmo-Smith
2022-03-11 11:44:23 +00:00
committed by GitHub
parent c71800a8d1
commit 3d3b14093c

View File

@@ -14,7 +14,7 @@
use std::sync::Arc;
use hyper::Method;
use hyper::{header::AUTHORIZATION, Method};
use mas_config::{Encrypter, HttpConfig};
use mas_jose::StaticKeystore;
use mas_templates::Templates;
@@ -59,7 +59,11 @@ pub fn filter(
.unify()
.or(introspection)
.unify()
.with(cors().allow_methods([Method::POST, Method::GET]));
.with(
cors()
.allow_methods([Method::POST, Method::GET])
.allow_headers([AUTHORIZATION]),
);
filter.or(authorization).boxed()
}