Class: Ewigkeks::CookiesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Ewigkeks::CookiesController
- Defined in:
- app/controllers/ewigkeks/cookies_controller.rb
Instance Method Summary collapse
Instance Method Details
#cache ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/ewigkeks/cookies_controller.rb', line 16 def cache if [Ewigkeks.].present? response.headers['Content-Type'] = 'text/html' response.headers['Last-Modified'] = 'Wed, 30 Jun 2010 21:36:48 GMT' response.headers['Expires'] = 'Tue, 31 Dec 2030 23:30:45 GMT' response.headers['Cache-Control'] = 'private, max-age=630720000' render text: [Ewigkeks.] else head status: :not_modified end end |
#etag ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'app/controllers/ewigkeks/cookies_controller.rb', line 29 def etag if [Ewigkeks.].present? response.headers['Etag'] = [Ewigkeks.] render text: [Ewigkeks.] else render text: request.headers.fetch('If-None-Match', ''), status: :not_modified end end |
#png ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/ewigkeks/cookies_controller.rb', line 3 def png if [Ewigkeks.].present? response.headers['Content-Type'] = 'image/png' response.headers['Last-Modified'] = 'Wed, 30 Jun 2010 21:36:48 GMT' response.headers['Expires'] = 'Tue, 31 Dec 2030 23:30:45 GMT' response.headers['Cache-Control'] = 'private, max-age=630720000' render text: png_blob, content_type: 'image/png' else head status: :not_modified end end |