From 66e61190a56864457c83788fdd38c2dc3362136c Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 9 Nov 2021 22:59:48 +0100 Subject: [PATCH] Fix force_ssl environment handling Fixes docker production example. --- config/environments/production.rb | 2 +- dotenv.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 48c33b0d..a74cac43 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -46,7 +46,7 @@ Rails.application.configure do # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - config.force_ssl = ENV.fetch('FORCE_SSL') { 'false' } + config.force_ssl = true if ENV.fetch('FORCE_SSL', false) # Include generic and useful information about system operation, but avoid logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). diff --git a/dotenv.example b/dotenv.example index f02147af..21ce4eb4 100644 --- a/dotenv.example +++ b/dotenv.example @@ -109,7 +109,7 @@ # OSEM_LOG_LEVEL=info # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. -# FORCE_SSL=1 +# FORCE_SSL=true # Your skylight.io keys # SKYLIGHT_AUTHENTICATION=1234