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