class Frodo::Middleware::CustomHeaders

Middleware that allows you to specify custom request headers when initializing Frodo client

Public Instance Methods

call(env) click to toggle source
# File lib/frodo/middleware/custom_headers.rb, line 7
def call(env)
  headers = @options[:request_headers]
  env[:request_headers].merge!(headers) if headers.is_a?(Hash)

  @app.call(env)
end