FEATURE: add clean support for running Discourse in a subfolder

To setup set DISCOURSE_RELATIVE_URL_ROOT to the folder you wish
This commit is contained in:
Sam
2015-03-09 11:45:36 +11:00
parent 4c4183228f
commit f5af4768eb
27 changed files with 81 additions and 34 deletions

View File

@@ -156,6 +156,10 @@ module Discourse
require 'auth'
Discourse.activate_plugins! unless Rails.env.test? and ENV['LOAD_PLUGINS'] != "1"
if GlobalSetting.relative_url_root.present?
config.relative_url_root = GlobalSetting.relative_url_root
end
config.after_initialize do
# So open id logs somewhere sane
OpenID::Util.logger = Rails.logger