Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
8459acd1
Commit
8459acd1
authored
8 years ago
by
Eugen Rochko
Browse files
Options
Downloads
Patches
Plain Diff
Fix for force SSL issue with websockets
parent
6426819b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/controllers/application_controller.rb
+2
-0
2 additions, 0 deletions
app/controllers/application_controller.rb
config/environments/production.rb
+1
-1
1 addition, 1 deletion
config/environments/production.rb
with
3 additions
and
1 deletion
app/controllers/application_controller.rb
+
2
−
0
View file @
8459acd1
...
...
@@ -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'
...
...
This diff is collapsed.
Click to expand it.
config/environments/production.rb
+
1
−
1
View file @
8459acd1
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment