pub struct Cors {
pub allowed_origins: Vec<String>,
pub allowed_headers: Vec<String>,
pub exposed_headers: Vec<String>,
pub max_age: u64,
}Expand description
CORS configuration for the OTLP HTTP receiver.
Fields§
§allowed_origins: Vec<String>Allowed origins for cross-origin requests. A bare * allows every origin; a partial
wildcard like http://*.example.com matches that prefix and suffix. Empty disables CORS.
Defaults to empty; configure this for browser-based exporters.
allowed_headers: Vec<String>Request headers allowed in preflight, beyond the implicit Accept, Accept-Language,
Content-Type, and Content-Language. Use * to allow any header. Empty also implicitly
allows X-Requested-With. Defaults to empty; add headers for browser exporters that send them.
exposed_headers: Vec<String>Response headers exposed to the browser via Access-Control-Expose-Headers.
Defaults to empty; add headers browser clients need to read.
max_age: u64Seconds browsers may cache a preflight response. Defaults to 0 (no caching); increase
to avoid repeated preflight round-trips for frequent browser requests.