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
[#54061] Rails.application.routes don't respects OPENPROJECT_RAILS__RELATIVE__URL__ROOT
Pavel Balashoufe7d214cc5ab
diff --git a/config/application.rb b/config/application.rbindex abcf69011f0..ef213504f88 100644--- a/config/application.rb+++ b/config/application.rb@@ -124,6 +124,14 @@ module OpenProject# That directory contains configurations and patches to rails core functionality.config.autoload_once_paths << Rails.root.join('lib_static').to_s+ # Configure the relative url root to be whatever the configuration is set to.+ # This allows for setting the root either via config file or via environment variable.+ # It must be called early enough. In our case in should be called earlier+ # than `config.exceptions_app = routes`. Otherwise Rails.application.routes.url_helpers+ # will not have configured prefix.+ # Read https://github.com/rails/rails/issues/42243 for some details.+ config.relative_url_root = OpenProject::Configuration['rails_relative_url_root']+# Use our own error rendering for prettier error pagesconfig.exceptions_app = routes@@ -138,7 +146,6 @@ module OpenProject# Add locales from crowdin translations to i18nconfig.i18n.load_path += Dir[Rails.root.join("config/locales/crowdin/*.{rb,yml}").to_s]config.i18n.default_locale = :en-# Fall back to default localeconfig.i18n.fallbacks = true@@ -208,9 +215,6 @@ module OpenProject# initialize variable for register plugin testsconfig.plugins_to_test_paths = []- # Configure the relative url root to be whatever the configuration is set to.- # This allows for setting the root either via config file or via environment variable.- config.action_controller.relative_url_root = OpenProject::Configuration['rails_relative_url_root']config.active_job.queue_adapter = :good_job