about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--config/initializers/session_store.rb2
-rw-r--r--spec/rails_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index ef61543a8..3dc0edd6f 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,3 +1,3 @@
 # Be sure to restart your server when you modify this file.
 
-Rails.application.config.session_store :cookie_store, key: '_mastodon_session', secure: (ENV['LOCAL_HTTPS'] == 'true')
+Rails.application.config.session_store :cookie_store, key: '_mastodon_session', secure: (Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true')
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 4f7399505..67c6b9205 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -46,7 +46,7 @@ RSpec.configure do |config|
   config.include ActiveSupport::Testing::TimeHelpers
 
   config.before :each, type: :feature do
-    https = ENV['LOCAL_HTTPS'] == 'true'
+    https = Rails.env.production? || ENV['LOCAL_HTTPS'] == 'true'
     Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
   end