You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-21 23:00:50 +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 std::sync::Arc;
|
||||||
|
|
||||||
use hyper::Method;
|
use hyper::{header::AUTHORIZATION, Method};
|
||||||
use mas_config::{Encrypter, HttpConfig};
|
use mas_config::{Encrypter, HttpConfig};
|
||||||
use mas_jose::StaticKeystore;
|
use mas_jose::StaticKeystore;
|
||||||
use mas_templates::Templates;
|
use mas_templates::Templates;
|
||||||
@@ -59,7 +59,11 @@ pub fn filter(
|
|||||||
.unify()
|
.unify()
|
||||||
.or(introspection)
|
.or(introspection)
|
||||||
.unify()
|
.unify()
|
||||||
.with(cors().allow_methods([Method::POST, Method::GET]));
|
.with(
|
||||||
|
cors()
|
||||||
|
.allow_methods([Method::POST, Method::GET])
|
||||||
|
.allow_headers([AUTHORIZATION]),
|
||||||
|
);
|
||||||
|
|
||||||
filter.or(authorization).boxed()
|
filter.or(authorization).boxed()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user