We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07df79f commit bfa2c01Copy full SHA for bfa2c01
1 file changed
lib/langseed_web/endpoint.ex
@@ -4,11 +4,16 @@ defmodule LangseedWeb.Endpoint do
4
# The session will be stored in the cookie and signed,
5
# this means its contents can be read but not tampered with.
6
# Set :encryption_salt if you would also like to encrypt it.
7
+ #
8
+ # Note: we set a `max_age` so the cookie survives browser restarts.
9
+ # This should align with `Langseed.Accounts.UserToken` session validity.
10
+ @session_max_age_in_seconds 14 * 24 * 60 * 60
11
@session_options [
12
store: :cookie,
13
key: "_langseed_key",
14
signing_salt: "rX77hzhl",
- same_site: "Lax"
15
+ same_site: "Lax",
16
+ max_age: @session_max_age_in_seconds
17
]
18
19
# Redirect www to non-www
0 commit comments