pub enum CorsError {
MissingOrigin,
BadOrigin,
MissingRequestMethod,
BadRequestMethod,
BadRequestHeaders,
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
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 WebResponseError for CorsError
impl WebResponseError for CorsError
DefaultError renderer support
source§fn status_code(&self) -> StatusCode
fn status_code(&self) -> StatusCode
Response’s status code Read more
source§fn error_response(&self, _: &HttpRequest) -> Response
fn error_response(&self, _: &HttpRequest) -> Response
Generate 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more