From 73aca9063d71e63fa07eda88886da7f756e8a2f9 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 17 Feb 2014 10:43:57 +1100 Subject: [PATCH] FEATURE: allow overriding server static asset if needed --- config/discourse_defaults.conf | 3 +++ config/environments/production.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf index ebaa77e5d..db0672468 100644 --- a/config/discourse_defaults.conf +++ b/config/discourse_defaults.conf @@ -86,3 +86,6 @@ redis_password = # enable Cross-origin Resource Sharing (CORS) directly at the application level enable_cors = false cors_origin = '*' + +# enable if you really need to serve assets in prd +serve_static_assets = false diff --git a/config/environments/production.rb b/config/environments/production.rb index c63b5d05c..4a0e2af5c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -10,7 +10,7 @@ Discourse::Application.configure do config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false + config.serve_static_assets = GlobalSetting.serve_static_assets if rails4? config.assets.js_compressor = :uglifier