Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanChepurnyi committed Oct 28, 2019
2 parents 5fb1000 + 4eeba04 commit b41fa20
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "csrf-cookie-token"
version = "0.1.2"
version = "0.2.0"
authors = ["Ivan Chepurnyi <[email protected]>"]
edition = "2018"

Expand All @@ -17,3 +17,8 @@ cookie = "0.12.0"

[build-dependencies]
cc = { git = "https://github.com/alexcrichton/cc-rs" }

[profile.release]
lto = true
codegen-units = 1
panic = 'abort'
2 changes: 1 addition & 1 deletion src/http_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl HttpArgs
cookie_domain: self.cookie_domain.clone(),
checksum_cookie_name: self.checksum_cookie_name.clone(),
token_cookie_name: self.token_cookie_name.clone(),
rng: SmallRng::from_entropy()
rng: SmallRng::from_rng(thread_rng()).unwrap()
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ fn main() {
};

let server = Server::bind(&addr)
.http1_only(true)
.http1_max_buf_size(8192)
.tcp_nodelay(true)
.serve(make_service)
.map_err(|e| {
eprintln!("server error: {}", e);
Expand Down

0 comments on commit b41fa20

Please sign in to comment.