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:
11
src/header/common/access_control_allow_methods.rs
Normal file
11
src/header/common/access_control_allow_methods.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use method::Method;
|
||||
|
||||
header! {
|
||||
#[doc="`Access-Control-Allow-Methods` header, part of"]
|
||||
#[doc="[CORS](www.w3.org/TR/cors/#access-control-allow-methods-response-header)"]
|
||||
#[doc=""]
|
||||
#[doc="The `Access-Control-Allow-Methods` header indicates, as part of the"]
|
||||
#[doc="response to a preflight request, which methods can be used during the"]
|
||||
#[doc="actual request."]
|
||||
(AccessControlAllowMethods, "Access-Control-Allow-Methods") => (Method)*
|
||||
}
|
||||
Reference in New Issue
Block a user