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