Class: CookieFilter
- Inherits:
-
Object
- Object
- CookieFilter
- Defined in:
- lib/threepwood/cookie_filter.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ CookieFilter
constructor
A new instance of CookieFilter.
Constructor Details
#initialize(app) ⇒ CookieFilter
Returns a new instance of CookieFilter.
3 4 5 |
# File 'lib/threepwood/cookie_filter.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 |
# File 'lib/threepwood/cookie_filter.rb', line 7 def call(env) status, headers, body = @app.call(env) headers.delete 'Set-Cookie' if headers["no-threepwood"] [status, headers, body] end |