class BasicAuth < Rack::Auth::Basic
  PROTECTED_PATHS = ['/images']

  def call(env)
    request = Rack::Request.new(env)

    return super if PROTECTED_PATHS.include? request.path

    @app.call(env)  # skip auth
  end
end

class BasicAuth < Rack::Auth::Basic
  PROTECTED_PATHS = ['/image', '/image/inline']

  def call(env)
    request = Rack::Request.new(env)

    return super if PROTECTED_PATHS.include? request.path

    @app.call(env)
  end
end

Fix basic auth with correct paths
Fix basic auth with correct paths
