Module cors

Source
Expand description

CORS handling utility functions

Structs§

Ascii
Case Insensitive wrapper of Ascii strings.
Origin
Request Origin

Enums§

AccessControlAllowHeaders
Headers allowed to access
AccessControlAllowOrigin
Origins allowed to access
AllowCors
CORS response headers
OriginProtocol
Origin Protocol

Functions§

get_cors_allow_headers
Validates if the AccessControlAllowedHeaders in the request are allowed.
get_cors_allow_origin
Returns correct CORS header (if any) given list of allowed origins and current origin.