pub trait CorsService:
Send
+ Sync
+ Sized
+ 'static
+ Send {
// 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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.