You've already forked authentication-service
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:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user