Skip to content

Commit 567cb4e

Browse files
committed
refactor: make cookies_should_be_secure public and add async-trait dependency
1 parent 15a8e73 commit 567cb4e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

backend/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ categories = ["web-programming", "web-programming::http-server"]
1313
[dependencies]
1414
axum = "0.8"
1515
axum-extra = { version = "0.12", features = ["typed-header", "cookie"] }
16+
async-trait = "0.1"
1617
tokio = { version = "1", features = ["full"] }
1718
tower = "0.5"
1819
tower-http = { version = "0.6", features = ["cors", "limit"] }

backend/src/auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ fn secret_has_min_entropy(secret: &str) -> bool {
292292
/// # Returns
293293
///
294294
/// `true` if cookies should be secure, `false` otherwise.
295-
fn cookies_should_be_secure() -> bool {
295+
pub fn cookies_should_be_secure() -> bool {
296296
match env::var("AUTH_COOKIE_SECURE") {
297297
Ok(value) if value.trim().eq_ignore_ascii_case("false") => {
298298
tracing::warn!(

0 commit comments

Comments
 (0)