From d90ea0e0adf931df159fb5e6e7d7c62ea0d5e992 Mon Sep 17 00:00:00 2001 From: Teal <git@teal.is> Date: Mon, 27 May 2024 16:39:49 +0200 Subject: [PATCH] ssl & host stuff --- app/controllers/application_controller.rb | 2 +- config/environments/production.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d6ecdb7..780046c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base helper_method :current_user def default_url_options - { host: 'rescheduled.c3lingo.org' } + { host: 'rescheduled.c3lingo.org', protocol: 'https' } if Rails.env.production? end private diff --git a/config/environments/production.rb b/config/environments/production.rb index 3f64ce1..5c55563 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -46,7 +46,7 @@ Rails.application.configure do # Assume all access to the app is happening through a SSL-terminating reverse proxy. # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. - # config.assume_ssl = true + config.assume_ssl = true # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true -- GitLab