Sha256: 63a372a4663384c4611cddd7d9d3b53fd8067c9a822a97f27650c64f43355d0f

Contents?: true

Size: 283 Bytes

Versions: 1

Compression:

Stored size: 283 Bytes

Contents

require "faraday/middleware"

module Searchkick
  class Middleware < Faraday::Middleware
    def call(env)
      if env.method == :get && env.url.path.to_s.end_with?("/_search")
        env.request.timeout = Searchkick.search_timeout
      end
      @app.call(env)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
searchkick-1.1.2 lib/searchkick/middleware.rb