Class: Nimbu::Server::Headers

Inherits:
Object
  • Object
show all
Defined in:
lib/nimbu/server/headers.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Headers

Returns a new instance of Headers.



4
5
6
# File 'lib/nimbu/server/headers.rb', line 4

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
12
13
# File 'lib/nimbu/server/headers.rb', line 8

def call(env)
  # Add user agent as X-Nimbu-Simulator header
  env['HTTP_X_NIMBU_SIMULATOR'] = Nimbu::Auth.user_agent

  @app.call(env)
end