Skip to content

Propshaft::Server middleware breaks config.assets.quiet setting #258

@callmesangio

Description

@callmesangio

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:

  1. rails new myapp
  2. cd myapp
  3. set config.assets.quiet = false in config/environments/development.rb
  4. touch app/assets/stylesheets/test-xxxxxxxx.digested.css
  5. rails s
  6. curl 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions