Sha256: 71b9020f390fa767964d898fd60c705241215ba11377e771e91ddc51d25f07e7

Contents?: true

Size: 650 Bytes

Versions: 21

Compression:

Stored size: 650 Bytes

Contents

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.2.3 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/scrivito_patches/cms_backend.rb
infopark_fiona7-1.2.0.0.1 lib/fiona7/scrivito_patches/cms_backend.rb