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:
Pyfisch
2015-04-07 11:54:01 +02:00
parent ed1ccc6ad3
commit 94f38950dd
13 changed files with 71 additions and 184 deletions

View File

@@ -0,0 +1,11 @@
use unicase::UniCase;
header! {
#[doc="`Access-Control-Request-Headers` header, part of"]
#[doc="[CORS](www.w3.org/TR/cors/#access-control-request-headers-request-header)"]
#[doc=""]
#[doc="The `Access-Control-Request-Headers` header indicates which headers will"]
#[doc="be used in the actual request as part of the preflight request."]
#[doc="during the actual request."]
(AccessControlRequestHeaders, "Access-Control-Request-Headers") => (UniCase<String>)*
}