Skip to main content

Module cors

Module cors 

Source
Expand description

Runtime CORS middleware for Actix Web services.

Aster products often store CORS settings in runtime configuration rather than in a static Actix builder. This module owns the reusable middleware mechanics: reading Origin, rejecting disallowed cross-origin requests, handling preflight requests, applying CORS response headers, and maintaining Vary. Product crates provide a policy resolver, exempt-path predicate, allowed/exposed header lists, and error mapping.

Re-exports§

pub use crate::shared::cors::CorsAllowedOrigins;
pub use crate::shared::cors::CorsMiddlewareError;
pub use crate::shared::cors::CorsMiddlewareErrorKind;
pub use crate::shared::cors::RuntimeCorsPolicy;

Structs§

RuntimeCors
Actix runtime CORS middleware.
RuntimeCorsConfig
Runtime CORS middleware configuration.
RuntimeCorsMiddleware
Service wrapper installed by RuntimeCors.