File tree Expand file tree Collapse file tree 4 files changed +5
-14
lines changed
Expand file tree Collapse file tree 4 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ class Application < Rails::Application
4444 config . filter_parameters += [ :password ]
4545
4646 # Path within public/ where assets are compiled to
47- config . assets . prefix = "/smartanswers"
47+ config . assets . prefix = "/assets/smartanswers"
48+
49+ # allow overriding the asset host with an enironment variable, useful for
50+ # when router is proxying to this app but asset proxying isn't set up.
51+ config . asset_host = ENV [ "ASSET_HOST" ]
4852
4953 # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
5054 config . assets . precompile += %w[
Original file line number Diff line number Diff line change 3636 # number of complex assets.
3737 config . assets . debug = true
3838
39- if ENV [ "GOVUK_ASSET_ROOT" ] . present?
40- config . asset_host = ENV [ "GOVUK_ASSET_ROOT" ]
41- end
42-
4339 # Suppress logger output for asset requests.
4440 config . assets . quiet = true
4541
Original file line number Diff line number Diff line change 3030 # Do not fallback to assets pipeline if a precompiled asset is missed.
3131 config . assets . compile = false
3232
33- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34- # config.action_controller.asset_host = "http://assets.example.com"
35-
3633 # Specifies the header that your server uses for sending files.
3734 # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
3835 # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
6158 # Send deprecation notices to registered listeners.
6259 config . active_support . deprecation = :notify
6360
64- config . action_controller . asset_host = ENV [ "GOVUK_ASSET_HOST" ]
65-
6661 if ENV [ "RUNNING_ON_HEROKU" ]
6762 # flush output to the underlying OS without buffering
6863 STDOUT . sync = true
Original file line number Diff line number Diff line change 11SmartAnswers ::Application . configure do
22 config . slimmer . logger = Rails . logger
3-
4- if Rails . env . development?
5- config . slimmer . asset_host = ENV [ "STATIC_DEV" ] || Plek . new . find ( "static" )
6- end
73end
You can’t perform that action at this time.
0 commit comments