Sha256: e0f6af4253b5babf1848a15f9ee85b837aa57d3fd29b8b4e6f3b592bd375d735
Contents?: true
Size: 384 Bytes
Versions: 23
Compression:
Stored size: 384 Bytes
Contents
require 'dragonfly' module Dragonfly class Middleware def initialize(app, dragonfly_app_name=nil) @app = app @dragonfly_app_name = dragonfly_app_name end def call(env) response = Dragonfly.app(@dragonfly_app_name).call(env) if response[1]['X-Cascade'] == 'pass' @app.call(env) else response end end end end
Version data entries
23 entries across 23 versions & 1 rubygems