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§

source

fn allowed_origins(&self) -> &[String]

Retrieves the allowed origins for this API

source

fn build_cors_layer(&self) -> Result<CorsLayer>

Builds the CorsLayer

Implementors§