Class: RackRailsCookieHeaderHack

Inherits:
Object
  • Object
show all
Defined in:
lib/stratagem/rack_hack.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RackRailsCookieHeaderHack

Returns a new instance of RackRailsCookieHeaderHack.



3
4
5
# File 'lib/stratagem/rack_hack.rb', line 3

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
# File 'lib/stratagem/rack_hack.rb', line 7

def call(env)
  status, headers, body = @app.call(env)
  headers['Set-Cookie'] = headers['Set-Cookie'].first
  [status, headers, body]
end