require 'scrivito/cms_backend' module Scrivito module CmsBackend # prevent the use of local URLs (localhost:7104) from cache # when running under a server def self.find_blob_data_from_cache(id, access, verb, options) cache_key = blob_data_cache_key(normalize_blob_id(id), access, verb, options) data = CmsDataCache.cache.read(cache_key) if !data.nil? && Fiona7::Middleware::ServerDetectionMiddleware.server_detected? tainted_data = data['url'] =~ /\Ahttps?:\/\/localhost:7104/ if tainted_data nil else data end else data end end end end