From 85485d1bf2936dbdea1cd482c1a3a45dda9d4d48 Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Thu, 9 Feb 2017 14:47:49 -0500 Subject: [PATCH] fallback to rails default when '/' root supplied --- config/environments/production.rb | 4 +++- env | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index cd23b595..7d1f4e9f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -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 diff --git a/env b/env index b330ddab..28460c99 100644 --- a/env +++ b/env @@ -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