Sha256: 221710395c237ac7aeb4e2c872e60fbcef67aeb986a689ff0d3f51b28f642acd

Contents?: true

Size: 401 Bytes

Versions: 62

Compression:

Stored size: 401 Bytes

Contents

module Workarea
  # TODO here for legacy support, remove in v4
  class SkipRackCacheMiddleware
    def initialize(app)
      @app = app
    end

    def call(env)
      request = Rack::Request.new(env)

      if request.path !~ /(jpe?g|png|ico|gif|css|js)$/ &&
          request.cookies['cache'] == 'false'
        env["rack-cache.force-pass"] = true
      end

      @app.call(env)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.4.27 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.5.4 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.26 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.5.3 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.25 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.5.2 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.24 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.5.1 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.23 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.22 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.5.0 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.21 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.5.0.beta.1 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.20 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.19 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.18 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.17 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.16 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.15 app/middleware/workarea/skip_rack_cache_middleware.rb
workarea-core-3.4.14 app/middleware/workarea/skip_rack_cache_middleware.rb