Module: Decidim::HttpCachingDisabler

Extended by:
ActiveSupport::Concern
Included in:
Admin::ApplicationController, ApplicationController, System::ApplicationController
Defined in:
decidim-core/app/controllers/concerns/decidim/http_caching_disabler.rb

Overview

This module will disable http caching from the controller in order to prevent proxies from storing sensible information.

Instance Method Summary collapse

Instance Method Details

#disable_http_cachingObject


15
16
17
18
19
# File 'decidim-core/app/controllers/concerns/decidim/http_caching_disabler.rb', line 15

def disable_http_caching
  response.headers["Cache-Control"] = "no-cache, no-store"
  response.headers["Pragma"] = "no-cache"
  response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT"
end