]> cat aescling's git repositories - mastodon.git/commitdiff
Fix for force SSL issue with websockets
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 18 Aug 2016 15:48:57 +0000 (17:48 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 18 Aug 2016 15:48:57 +0000 (17:48 +0200)
app/controllers/application_controller.rb
config/environments/production.rb

index b10fa977e749d05fddbc407f5610e47f96299e52..91f76d311b7f08aee713245c383058a3529c3ff5 100644 (file)
@@ -3,6 +3,8 @@ class ApplicationController < ActionController::Base
   # For APIs, you may want to use :null_session instead.
   protect_from_forgery with: :exception
 
+  force_ssl if: "ENV['LOCAL_HTTPS'] == 'true'"
+
   # Profiling
   before_action do
     if (current_user && current_user.admin?) || Rails.env == 'development'
index 4c4ed760c61de4d254d69af5a0a3feef96e69edc..09b77654f331b4f49f4487eaa8fd31d947d60e4f 100644 (file)
@@ -32,7 +32,7 @@ Rails.application.configure do
   # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
 
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
-  config.force_ssl = ENV['LOCAL_HTTPS'] == 'true'
+  config.force_ssl = false
 
   # Use the lowest log level to ensure availability of diagnostic information
   # when problems arise.