mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 17:17:32 +00:00
Fix enforce HTTPS in production. (#6180)
This commit is contained in:
parent
06636c6eca
commit
8d51ce4290
|
@ -1,3 +1,3 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# 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')
|
||||||
|
|
|
@ -46,7 +46,7 @@ RSpec.configure do |config|
|
||||||
config.include ActiveSupport::Testing::TimeHelpers
|
config.include ActiveSupport::Testing::TimeHelpers
|
||||||
|
|
||||||
config.before :each, type: :feature do
|
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')}"
|
Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue