Class: Rack::DontMessWithMyJs
- Inherits:
-
Object
- Object
- Rack::DontMessWithMyJs
- Defined in:
- lib/rack/dont_mess_with_my_js.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ DontMessWithMyJs
constructor
A new instance of DontMessWithMyJs.
Constructor Details
#initialize(app) ⇒ DontMessWithMyJs
Returns a new instance of DontMessWithMyJs.
3 4 5 |
# File 'lib/rack/dont_mess_with_my_js.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/rack/dont_mess_with_my_js.rb', line 7 def call(env) status, headers, body = @app.call(env) headers['Cache-Control'] = ['no-transform', headers['Cache-Control']].compact.join(',') [status, headers, body] end |