Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Commit

Permalink
Fix CORS regression (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawliet89 authored Jul 19, 2017
1 parent ca21247 commit 9e90ba9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rowdy"
version = "0.0.5"
version = "0.0.6"
license = "Apache-2.0"
authors = ["Yong Wen Chua <[email protected]>"]
build = "build.rs"
Expand Down Expand Up @@ -36,7 +36,7 @@ hyper = "0.10"
log = "0.3"
rocket = "0.3.0"
rocket_codegen = "0.3.0"
rocket_cors = "0.1.3"
rocket_cors = "0.1.4"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rowdy-cli"
version = "0.0.5"
version = "0.0.6"
authors = ["Yong Wen Chua <[email protected]>"]

[[bin]]
Expand Down
16 changes: 8 additions & 8 deletions src/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);
}

#[test]
Expand Down Expand Up @@ -265,7 +265,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);

let deserialized: Token<PrivateClaim> = not_err!(serde_json::from_str(&body_str));
let actual_token = not_err!(deserialized.decode(
Expand Down Expand Up @@ -328,7 +328,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);
}

#[test]
Expand All @@ -355,7 +355,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);

let www_header: Vec<_> = response.headers().get("WWW-Authenticate").collect();
assert_eq!(www_header, vec!["Basic realm=https://www.acme.com/"]);
Expand Down Expand Up @@ -393,7 +393,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);
}

/// Tests that we can request a refresh token and then get a new access token with the issued refresh token
Expand Down Expand Up @@ -432,7 +432,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);

let deserialized: Token<PrivateClaim> = not_err!(serde_json::from_str(&body_str));
let actual_token = not_err!(deserialized.decode(
Expand Down Expand Up @@ -465,7 +465,7 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);

let deserialized: Token<PrivateClaim> = not_err!(serde_json::from_str(&body_str));
let actual_token = not_err!(deserialized.decode(
Expand Down Expand Up @@ -525,6 +525,6 @@ mod tests {
.headers()
.get_one("Access-Control-Allow-Origin")
.expect("to exist");
assert_eq!("https://www.example.com/", origin_header);
assert_eq!("https://www.example.com", origin_header);
}
}

0 comments on commit 9e90ba9

Please sign in to comment.