class Simplewoo::Connection::AppSecretMiddleware

Middleware for inserting the app secret header into requests

Public Class Methods

new(app, options = {}) click to toggle source
# File lib/simplewoo/connection.rb, line 33
def initialize(app, options = {})
  @app = app
  @options = options
end

Public Instance Methods

call(env) click to toggle source
# File lib/simplewoo/connection.rb, line 38
def call(env)
  env[:request_headers]["Woofound-App-Secret"] = @options[:app_secret]
  @app.call(env)
end