Skip to content

Commit

Permalink
Secure Cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbate19 committed Sep 23, 2024
1 parent 75f7683 commit f8162c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ GOOGLE_CLIENT_SECRET=

HOST=
PORT=
REDIRECT_DOMAIN=
REDIRECT_DOMAIN=

DEVELOPMENT=true
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async fn main() -> std::io::Result<()> {
}))
.wrap(
SessionMiddleware::builder(CookieSessionStore::default(), session_key.clone())
.cookie_secure(false)
.cookie_secure(!env::var("DEVELOPMENT").is_ok())
.build(),
)
.wrap(Logger::default())
Expand Down

0 comments on commit f8162c3

Please sign in to comment.