Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions src/amber_cli/commands/new_command.cr
Original file line number Diff line number Diff line change
Expand Up @@ -812,14 +812,18 @@ database:

session:
key: "#{name}.session"
# signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by
# the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also
# hides it from the visitor. adapter keeps sessions on the server through `adapter`.
# Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store
# is named here; the cookie carries only the encrypted session id. It accepts
# signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is
# released, signed_cookie and encrypted_cookie keep the session in the visitor's
# cookie with nothing held on the server, and store: adapter becomes valid.
store: "signed_cookie"
# Used only when store is adapter: memory (at most 10,000 sessions per process) or redis.
# memory, or an adapter the app registers with Amber::Adapters::AdapterFactory.
# The memory adapter has no size limit in beta.11; amber#1455 caps it at
# session.max_memory_sessions (10,000 by default).
adapter: "memory"
# Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions
# end when the browser closes and lets server-side sessions live until evicted.
# Seconds a session lasts after its last change (two weeks). 0 makes the cookie end
# when the browser closes; a server-side session with 0 never expires.
expires: 1209600

static:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ when "mysql" -%>

session:
key: <%= @name %>.session
# signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by
# the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also
# hides it from the visitor. adapter keeps sessions on the server through `adapter`.
# Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store
# is named here; the cookie carries only the encrypted session id. It accepts
# signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is
# released, signed_cookie and encrypted_cookie keep the session in the visitor's
# cookie with nothing held on the server, and store: adapter becomes valid.
store: signed_cookie
# Used only when store is adapter: memory (at most 10,000 sessions per process) or redis.
# memory, or an adapter the app registers with Amber::Adapters::AdapterFactory.
# The memory adapter has no size limit in beta.11; amber#1455 caps it at
# session.max_memory_sessions (10,000 by default).
adapter: memory
# Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions
# end when the browser closes and lets server-side sessions live until evicted.
# Seconds a session lasts after its last change (two weeks). 0 makes the cookie end
# when the browser closes; a server-side session with 0 never expires.
expires: 1209600

logging:
Expand Down
16 changes: 10 additions & 6 deletions src/amber_cli/templates/app/config/environments/production.yml.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ database:

session:
key: <%= @name %>.session
# signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by
# the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also
# hides it from the visitor. adapter keeps sessions on the server through `adapter`.
# Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store
# is named here; the cookie carries only the encrypted session id. It accepts
# signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is
# released, signed_cookie and encrypted_cookie keep the session in the visitor's
# cookie with nothing held on the server, and store: adapter becomes valid.
store: signed_cookie
# Used only when store is adapter: memory (at most 10,000 sessions per process) or redis.
# memory, or an adapter the app registers with Amber::Adapters::AdapterFactory.
# The memory adapter has no size limit in beta.11; amber#1455 caps it at
# session.max_memory_sessions (10,000 by default).
adapter: memory
# Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions
# end when the browser closes and lets server-side sessions live until evicted.
# Seconds a session lasts after its last change (two weeks). 0 makes the cookie end
# when the browser closes; a server-side session with 0 never expires.
expires: 1209600

logging:
Expand Down
16 changes: 10 additions & 6 deletions src/amber_cli/templates/app/config/environments/test.yml.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ when "mysql" -%>

session:
key: <%= @name %>.session
# signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by
# the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also
# hides it from the visitor. adapter keeps sessions on the server through `adapter`.
# Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store
# is named here; the cookie carries only the encrypted session id. It accepts
# signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is
# released, signed_cookie and encrypted_cookie keep the session in the visitor's
# cookie with nothing held on the server, and store: adapter becomes valid.
store: signed_cookie
# Used only when store is adapter: memory (at most 10,000 sessions per process) or redis.
# memory, or an adapter the app registers with Amber::Adapters::AdapterFactory.
# The memory adapter has no size limit in beta.11; amber#1455 caps it at
# session.max_memory_sessions (10,000 by default).
adapter: memory
# Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions
# end when the browser closes and lets server-side sessions live until evicted.
# Seconds a session lasts after its last change (two weeks). 0 makes the cookie end
# when the browser closes; a server-side session with 0 never expires.
expires: 1209600

logging:
Expand Down
Loading