class Simplewoo::Connection::TrustedAppMiddleware
Middleware for inserting the trusted header into requests
Public Class Methods
new(app, options = {})
click to toggle source
# File lib/simplewoo/connection.rb, line 57 def initialize(app, options = {}) @app = app @options = options end
Public Instance Methods
call(env)
click to toggle source
# File lib/simplewoo/connection.rb, line 62 def call(env) env[:request_headers]["Woofound-Use-Trusted-Auth"] = @options[:trusted].to_s @app.call(env) end