Sha256: c56efeda0e4adcdd54668af4ec30add4cd6518e15f62a73e2c4763737ce51a79
Contents?: true
Size: 576 Bytes
Versions: 12
Compression:
Stored size: 576 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["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
Version data entries
12 entries across 12 versions & 1 rubygems