Commit 5d4abc43 authored by Daniel Gerhardt's avatar Daniel Gerhardt

Update root path config for Redmine 4.0

parent a25ac74b
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Rails.application
use OmniAuth::Builder do
configure do |config|
config.path_prefix = RedmineApp::Application.routes.default_scope + '/auth'
end
map ENV['RAILS_RELATIVE_URL_ROOT'] || '/' do
run Rails.application
end
......@@ -10,10 +10,11 @@ if Dir.glob(File.join(vendor_plugins_dir, "*")).any?
exit 1
end
RedmineApp::Application.routes.default_scope = "/redmine"
# Initialize the Rails application
Rails.application.initialize!
ActionController::Base.relative_url_root = RedmineApp::Application.routes.default_scope
Redmine::Utils::relative_url_root = RedmineApp::Application.routes.default_scope
ENV['RAILS_RELATIVE_URL_ROOT'] = "/redmine"
Redmine::Utils::relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment