mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-18 00:54:49 +01:00
Fix for force SSL issue with websockets
This commit is contained in:
parent
6426819b6f
commit
8459acd123
@ -3,6 +3,8 @@ class ApplicationController < ActionController::Base
|
|||||||
# For APIs, you may want to use :null_session instead.
|
# For APIs, you may want to use :null_session instead.
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
|
|
||||||
|
force_ssl if: "ENV['LOCAL_HTTPS'] == 'true'"
|
||||||
|
|
||||||
# Profiling
|
# Profiling
|
||||||
before_action do
|
before_action do
|
||||||
if (current_user && current_user.admin?) || Rails.env == 'development'
|
if (current_user && current_user.admin?) || Rails.env == 'development'
|
||||||
|
@ -32,7 +32,7 @@ Rails.application.configure do
|
|||||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
# 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.
|
# 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
|
# Use the lowest log level to ensure availability of diagnostic information
|
||||||
# when problems arise.
|
# when problems arise.
|
||||||
|
Loading…
Reference in New Issue
Block a user