refactor(headers): Use header!() for CORS headers.
This is the last bunch of headers that should use the new macro. Moved them out of their own folder so that the macro works. Changed them, so that they are more in line with the other headers. BREAKING CHANGE: `AccessControlAllowHeaders` and `AccessControlRequestHeaders` values are case insensitive now. `AccessControlAllowOrigin` variants are now `Any` and `Value` to match the other headers.
This commit is contained in:
8
src/header/common/access_control_max_age.rs
Normal file
8
src/header/common/access_control_max_age.rs
Normal file
@@ -0,0 +1,8 @@
|
||||
header! {
|
||||
#[doc="`Access-Control-Max-Age` header, part of"]
|
||||
#[doc="[CORS](www.w3.org/TR/cors/#access-control-max-age-response-header)"]
|
||||
#[doc=""]
|
||||
#[doc="The `Access-Control-Max-Age` header indicates how long the results of a"]
|
||||
#[doc="preflight request can be cached in a preflight result cache."]
|
||||
(AccessControlMaxAge, "Access-Control-Max-Age") => [u32]
|
||||
}
|
||||
Reference in New Issue
Block a user