fallback to rails default when '/' root supplied

This commit is contained in:
Zachary Chai 2017-02-09 14:47:49 -05:00
parent a45a704be3
commit 85485d1bf2
2 changed files with 5 additions and 3 deletions

View File

@ -88,5 +88,7 @@ Rails.application.configure do
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
config.relative_url_root = ENV['RAILS_RELATIVE_URL_ROOT'] || '/b'
if ENV['RELATIVE_URL_ROOT'] != '/'
config.relative_url_root = ENV['RELATIVE_URL_ROOT'] || '/b'
end
end

4
env
View File

@ -67,6 +67,6 @@ GOOGLE_OAUTH2_SECRET=
# Prefix for the application's root URL
# Useful for deploying the application to a subdirectory
#
# default: '/b' (recommended)
# default is '/b' (recommended)
#
#RAILS_RELATIVE_URL_ROOT=/b
#RELATIVE_URL_ROOT=/b