You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-23 11:02:35 +03:00
Propagate parent trace context
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
use std::collections::HashSet;
|
||||
|
||||
use hyper::Method;
|
||||
use oauth2_types::{
|
||||
oidc::Metadata,
|
||||
pkce::CodeChallengeMethod,
|
||||
@@ -86,10 +87,15 @@ pub(super) fn filter(
|
||||
code_challenge_methods_supported,
|
||||
};
|
||||
|
||||
let cors = warp::cors().allow_any_origin();
|
||||
// TODO: get the headers list from the global opentelemetry propagators
|
||||
let cors = warp::cors()
|
||||
.allow_method(Method::GET)
|
||||
.allow_any_origin()
|
||||
.allow_headers(["traceparent"]);
|
||||
|
||||
warp::path!(".well-known" / "openid-configuration")
|
||||
.and(warp::get())
|
||||
.map(move || warp::reply::json(&metadata))
|
||||
.with(cors)
|
||||
warp::path!(".well-known" / "openid-configuration").and(
|
||||
warp::get()
|
||||
.map(move || warp::reply::json(&metadata))
|
||||
.with(cors),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user