OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#43530] Apply "No SSL" as specified with packager
Christophe Bliard8a292d34fe96
diff --git a/lib/tasks/packager.rake b/lib/tasks/packager.rakeindex 0acba8516e9..e830d790e81 100644--- a/lib/tasks/packager.rake+++ b/lib/tasks/packager.rake@@ -65,11 +65,13 @@ namespace :packager doSetting.sys_api_key = ENV.fetch('SYS_API_KEY', nil)Setting.host_name = ENV.fetch('SERVER_HOSTNAME', Setting.host_name)+ # SERVER_PROTOCOL is set by the packager apache2 addon+ # other SERVER_PROTOCOL_xxx variables can be manually set by userif ENV['SERVER_PROTOCOL_HTTPS_NO_HSTS']# Allow setting only HTTPS setting without enabling FORCE__SSL# due to external proxy configuration. This avoids activation of HSTS headers.shell_setup(['config:set', "OPENPROJECT_HTTPS=true"])- shell_setup(['config:unset', "OPENPROJECT_RAILS__FORCE__SSL"])+ shell_setup(['config:set', "OPENPROJECT_RAILS__FORCE__SSL=false"])elsif ENV['SERVER_PROTOCOL_FORCE_HTTPS'] || ENV.fetch('SERVER_PROTOCOL', Setting.protocol) == 'https'# Allow overriding the protocol setting from ENV# to allow instances where SSL is terminated earlier to respect that setting@@ -77,7 +79,7 @@ namespace :packager doshell_setup(['config:set', "OPENPROJECT_RAILS__FORCE__SSL=true"])elseshell_setup(['config:set', "OPENPROJECT_HTTPS=false"])- shell_setup(['config:unset', "OPENPROJECT_RAILS__FORCE__SSL"])+ shell_setup(['config:set', "OPENPROJECT_RAILS__FORCE__SSL=false"])end# Run customization step, if it is defined.