Sha256: 3bde2cbfe1db4e0118b723569680dd8f3971999b3c1e20406784178988fc3df5
Contents?: true
Size: 564 Bytes
Versions: 60
Compression:
Stored size: 564 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim # This module will disable http caching from the controller in # order to prevent proxies from storing sensible information. module HttpCachingDisabler extend ActiveSupport::Concern included do before_action :disable_http_caching end 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 end end
Version data entries
60 entries across 60 versions & 1 rubygems