force ssl only if host passed
This commit is contained in:
@@ -59,7 +59,7 @@ Rails.application.configure do
|
||||
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
||||
|
||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||
config.force_ssl = ENV['FORCE_SSL'] == 'true'
|
||||
config.force_ssl = ENV['FORCE_SSL'].present?
|
||||
|
||||
# Include generic and useful information about system operation, but avoid logging too much
|
||||
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@ services:
|
||||
volumes:
|
||||
- .:/data
|
||||
environment:
|
||||
FORCE_SSL: 'true'
|
||||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/docuseal
|
||||
- FORCE_SSL=${HOST}
|
||||
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal
|
||||
|
||||
postgres:
|
||||
image: postgres:15
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ module Docuseal
|
||||
|
||||
DEFAULT_URL_OPTIONS = {
|
||||
host: HOST,
|
||||
protocol: ENV['FORCE_SSL'] == 'true' ? 'https' : 'http'
|
||||
protocol: ENV['FORCE_SSL'].present? ? 'https' : 'http'
|
||||
}.freeze
|
||||
|
||||
module_function
|
||||
|
||||
Reference in New Issue
Block a user