pub enum CorsError {
MissingOrigin,
BadOrigin,
MissingRequestMethod,
BadRequestMethod,
BadRequestHeaders,
MissingRequestHeaders,
OriginNotAllowed,
MethodNotAllowed,
HeadersNotAllowed,
}
Expand description
A set of errors that can occur during processing CORS
Variants§
MissingOrigin
The HTTP request header Origin
is required but was not provided
BadOrigin
The HTTP request header Origin
could not be parsed correctly.
MissingRequestMethod
The request header Access-Control-Request-Method
is required but is
missing
BadRequestMethod
The request header Access-Control-Request-Method
has an invalid value
BadRequestHeaders
The request header Access-Control-Request-Headers
has an invalid
value
MissingRequestHeaders
The request header Access-Control-Request-Headers
is required but is
missing.
OriginNotAllowed
Origin is not allowed to make this request
MethodNotAllowed
Requested method is not allowed
HeadersNotAllowed
One or more headers requested are not allowed
Trait Implementations§
source§impl Fail for CorsError
impl Fail for CorsError
source§fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
source§fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read moresource§impl ResponseError for CorsError
impl ResponseError for CorsError
source§fn error_response(&self) -> HttpResponse
fn error_response(&self) -> HttpResponse
Create response for error Read more
Auto Trait Implementations§
impl RefUnwindSafe for CorsError
impl Send for CorsError
impl Sync for CorsError
impl Unpin for CorsError
impl UnwindSafe for CorsError
Blanket Implementations§
§impl<T> AsFail for Twhere
T: Fail,
impl<T> AsFail for Twhere
T: Fail,
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more