FEATURE: allow overriding server static asset if needed

This commit is contained in:
Sam 2014-02-17 10:43:57 +11:00
parent 5777423b05
commit 73aca9063d
2 changed files with 4 additions and 1 deletions

View File

@ -86,3 +86,6 @@ redis_password =
# enable Cross-origin Resource Sharing (CORS) directly at the application level # enable Cross-origin Resource Sharing (CORS) directly at the application level
enable_cors = false enable_cors = false
cors_origin = '*' cors_origin = '*'
# enable if you really need to serve assets in prd
serve_static_assets = false

View File

@ -10,7 +10,7 @@ Discourse::Application.configure do
config.action_controller.perform_caching = true config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this) # 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? if rails4?
config.assets.js_compressor = :uglifier config.assets.js_compressor = :uglifier