Module gotham_restful::cors
source · [−]Structs
This is the configuration that the CORS handler will follow. Its default configuration is basically not to touch any responses, resulting in the browser’s default behaviour.
Enums
Specify the allowed headers of the request. It is up to the browser to check that only the allowed headers are sent with the request.
Specify the allowed origins of the request. It is up to the browser to check the validity of the origin. This, when sent to the browser, will indicate whether or not the request’s origin was allowed to make the request.
Traits
Add CORS routing for your path. This is required for handling preflight requests.
Functions
Handle CORS for a non-preflight request. This means manipulating the res
HTTP headers so that
the response is aligned with the state
’s CorsConfig.