pboling/rack-insight

View on GitHub
lib/rack/insight/rack_static_bug_avoider.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Rack::Insight
  class RackStaticBugAvoider
    def initialize(app, static_app)
      @app = app
      @static_app = static_app
    end

    def call(env)
      if env["PATH_INFO"]
        @static_app.call(env)
      else
        @app.call(env)
      end
    end
  end
end