You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Better CORS filter to allow OTEL propagator headers
This commit is contained in:
@ -30,7 +30,12 @@ use opentelemetry_semantic_conventions as semcov;
|
||||
|
||||
pub fn setup(config: &TelemetryConfig) -> anyhow::Result<Option<Tracer>> {
|
||||
global::set_error_handler(|e| tracing::error!("{}", e))?;
|
||||
global::set_text_map_propagator(propagator());
|
||||
let propagator = propagator();
|
||||
|
||||
// The CORS filter needs to know what headers it should whitelist for
|
||||
// CORS-protected requests.
|
||||
mas_core::filters::cors::set_propagator(&propagator);
|
||||
global::set_text_map_propagator(propagator);
|
||||
|
||||
let tracer = tracer(&config.tracing)?;
|
||||
meter(&config.metrics)?;
|
||||
|
Reference in New Issue
Block a user