2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-02-05 14:16:51 -05:00
|
|
|
# Be sure to restart your server when you modify this file.
|
2016-10-27 00:15:58 -04:00
|
|
|
#
|
|
|
|
require_dependency 'discourse_cookie_store'
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2016-11-24 19:35:18 -05:00
|
|
|
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
|
|
|
|
|
2016-03-07 13:40:14 -05:00
|
|
|
Discourse::Application.config.session_store(
|
2016-10-27 00:15:58 -04:00
|
|
|
:discourse_cookie_store,
|
2016-03-07 13:40:14 -05:00
|
|
|
key: '_forum_session',
|
|
|
|
path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root
|
|
|
|
)
|