-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Hi,
the introduction of the Propshaft::Server middleware in Propshaft 1.3.0 made so that the config.assets.quiet setting of Rails cannot be used anymore to control logging of asset requests.
Specifically, setting config.assets.quiet to false has no effect, as asset requests don't get logged anyway.
This has an impact on the development environment.
Steps to reproduce:
rails new myappcd myapp- set
config.assets.quiet = falseinconfig/environments/development.rb touch app/assets/stylesheets/test-xxxxxxxx.digested.cssrails scurl http://127.0.0.1:3000/assets/test-xxxxxxxx.digested.css
With Propshaft >= 1.3.0 the terminal running rails s does not show any log regarding the requested asset.
Reverting to Propshaft 1.2.1 in the Gemfile, while keeping other conditions untouched, fixes the issue and requests get logged:
Started GET "/assets/test-xxxxxxxx.digested.css" for 127.0.0.1 at 2025-11-05 11:54:10 +0100
The cause of this seems to be that Propshaft::Server prevents Rails::Rack::Logger from actually seeing asset requests. Similarly, Propshaft::QuietAssets has no chance to make any difference about it.
# rails middleware (with config.assets.quiet = true to include Propshaft::QuietAssets)
use ActionDispatch::HostAuthorization
use Rack::Sendfile
use ActionDispatch::Static
use Propshaft::Server
use ActionDispatch::Executor
use ActionDispatch::ServerTiming
use Rack::Runtime
use Rack::MethodOverride
use ActionDispatch::RequestId
use ActionDispatch::RemoteIp
use Propshaft::QuietAssets
use Rails::Rack::Logger
use ActionDispatch::ShowExceptions
use WebConsole::Middleware
use ActionDispatch::DebugExceptions
use ActionDispatch::ActionableExceptions
use ActionDispatch::Reloader
use ActionDispatch::Callbacks
use ActiveRecord::Migration::CheckPending
use ActionDispatch::Cookies
use ActionDispatch::Session::CookieStore
use ActionDispatch::Flash
use ActionDispatch::ContentSecurityPolicy::Middleware
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
use Rack::TempfileReaper
run Myapp::Application.routes
Please let me know if you need further information.