refactor(headers): Add tests and docs to CORS headers
This commit is contained in:
@@ -7,7 +7,17 @@ header! {
|
||||
#[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."]
|
||||
#[doc=""]
|
||||
#[doc="# ABNF"]
|
||||
#[doc="```plain"]
|
||||
#[doc="Access-Control-Allow-Methods: \"Access-Control-Allow-Methods\" \":\" #Method"]
|
||||
#[doc="```"]
|
||||
#[doc=""]
|
||||
#[doc="# Example values"]
|
||||
#[doc="* `PUT, DELETE, XMODIFY`"]
|
||||
(AccessControlAllowMethods, "Access-Control-Allow-Methods") => (Method)*
|
||||
|
||||
test_access_control_allow_methods {}
|
||||
test_access_control_allow_methods {
|
||||
test_header!(test1, vec![b"PUT, DELETE, XMODIFY"]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user