Class: Rack::SSLCure

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/ssl_cure.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ SSLCure

Returns a new instance of SSLCure.



3
4
5
# File 'lib/rack/ssl_cure.rb', line 3

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



7
8
9
10
11
# File 'lib/rack/ssl_cure.rb', line 7

def call(env)
  status, headers, response = @app.call(env)
  headers.merge!('Strict-Transport-Security' => 'max-age=0')
  [status, headers, response]
end