discourse/config/initializers/100-session_store.rb
Loïc Guitaut 008b700a3f DEV: Upgrade to Rails 7
This patch upgrades Rails to version 7.0.2.4.
2022-04-28 11:51:03 +02:00

22 lines
708 B
Ruby

# frozen_string_literal: true
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store(
:discourse_cookie_store,
key: '_forum_session',
path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
)
Rails.application.config.to_prepare do
if Rails.env.development? && SiteSetting.force_https
STDERR.puts
STDERR.puts "WARNING: force_https is enabled in dev"
STDERR.puts "It is very unlikely you are running HTTPS in dev."
STDERR.puts "Without HTTPS your session cookie will not work"
STDERR.puts "Try: bin/rails c"
STDERR.puts "SiteSetting.force_https = false"
STDERR.puts
end
end