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.*/ ]
|
# 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.
|
# 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
|
# Include generic and useful information about system operation, but avoid logging too much
|
||||||
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
# information to avoid inadvertent exposure of personally identifiable information (PII).
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- .:/data
|
- .:/data
|
||||||
environment:
|
environment:
|
||||||
FORCE_SSL: 'true'
|
- FORCE_SSL=${HOST}
|
||||||
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/docuseal
|
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ module Docuseal
|
|||||||
|
|
||||||
DEFAULT_URL_OPTIONS = {
|
DEFAULT_URL_OPTIONS = {
|
||||||
host: HOST,
|
host: HOST,
|
||||||
protocol: ENV['FORCE_SSL'] == 'true' ? 'https' : 'http'
|
protocol: ENV['FORCE_SSL'].present? ? 'https' : 'http'
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
module_function
|
module_function
|
||||||
|
|||||||
Reference in New Issue
Block a user