Browse Source

Fix for force SSL issue with websockets

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
8459acd123
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      app/controllers/application_controller.rb
  2. +1
    -1
      config/environments/production.rb

+ 2
- 0
app/controllers/application_controller.rb View 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'

+ 1
- 1
config/environments/production.rb View 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.

Loading…
Cancel
Save