1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 10:27:42 +02:00

cleanup Binary type; more cors tests

This commit is contained in:
Nikolay Kim
2018-01-10 15:28:33 -08:00
parent fee54d1de0
commit f7807e43d8
2 changed files with 22 additions and 52 deletions

View File

@ -794,6 +794,7 @@ mod tests {
fn test_response() {
let cors = Cors::build()
.send_wildcard()
.disable_preflight()
.max_age(3600)
.allowed_methods(vec![Method::GET, Method::OPTIONS, Method::POST])
.allowed_headers(vec![header::AUTHORIZATION, header::ACCEPT])
@ -823,6 +824,7 @@ mod tests {
resp.headers().get(header::VARY).unwrap().as_bytes());
let cors = Cors::build()
.disable_vary_header()
.allowed_origin("https://www.example.com")
.finish().unwrap();
let resp: HttpResponse = HTTPOk.into();