Sha256: ccf15ce73a9a65123ef4c3ad4a09c9c923491c3e6527a9371d9234fac42e8cd7
Contents?: true
Size: 435 Bytes
Versions: 9
Compression:
Stored size: 435 Bytes
Contents
class Embork::Forwarder def self.target @target end def self.target=(target) @target = target end attr_reader :app def initialize(app, options = {}) @app = app end def call(env) status, headers, body = @app.call(env) if status == 404 status, headers, body = self.class.target.new(@app).call(env) headers['Push-State-Redirect'] = 'true' end [ status, headers, body ] end end
Version data entries
9 entries across 9 versions & 1 rubygems