Sha256: 440a4d2b379a4c22b91cbb3c2ed6f98ec85279f6f15d0a6b190fd3ea0518d011
Contents?: true
Size: 625 Bytes
Versions: 13
Compression:
Stored size: 625 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim module Headers # 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["Pragma"] = "no-cache" response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT" response.cache_control.replace(no_cache: true, extras: ["no-store"]) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems