diff options
Diffstat (limited to 'config/environment.rb')
-rw-r--r-- | config/environment.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/environment.rb b/config/environment.rb index 76f459889..85e23e8a4 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -97,6 +97,11 @@ end # Domain for URLs (so can work for scripts, not just web pages) ActionController::UrlWriter.default_url_options[:host] = MySociety::Config.get("DOMAIN", 'localhost:3000') +# So that javascript assets use full URL, so proxied admin URLs read javascript OK +if (MySociety::Config.get("DOMAIN", "") != "") + ActionController::Base.asset_host = MySociety::Config.get("DOMAIN", 'localhost:3000') +end + # Monkeypatch! Method to remove individual error messages from an ActiveRecord. module ActiveRecord class Errors |