Fixes not being able to login or signup when running in production mode on a non-HTTPS site.
12 lines
370 B
Ruby
12 lines
370 B
Ruby
# Be sure to restart your server when you modify this file.
|
|
|
|
# https://api.rubyonrails.org/classes/ActionDispatch/Cookies.html
|
|
Rails.application.config.session_store(
|
|
:cookie_store,
|
|
key: Danbooru.config.session_cookie_name,
|
|
domain: :all,
|
|
tld_length: 2,
|
|
same_site: :lax,
|
|
secure: Rails.env.production? && Danbooru.config.canonical_url.match?(%r!\Ahttps://!)
|
|
)
|