Trait graphql_starter::axum::CorsService
source · pub trait CorsService: Send + Sync {
// Required methods
fn allowed_origins(&self) -> &[String];
fn build_cors_layer(&self) -> Result<CorsLayer>;
}
Expand description
CORS service
Required Methods§
sourcefn allowed_origins(&self) -> &[String]
fn allowed_origins(&self) -> &[String]
Retrieves the allowed origins for this API
sourcefn build_cors_layer(&self) -> Result<CorsLayer>
fn build_cors_layer(&self) -> Result<CorsLayer>
Builds the CorsLayer