Sha256: 7e29c4fbc75b8f3a9ba0f54316e8e6ad842d91c1d7c816c3749c8cdb955d2986
Contents?: true
Size: 367 Bytes
Versions: 5
Compression:
Stored size: 367 Bytes
Contents
module Ixtlan class ChildPath def initialize(app, rootpath) @app = app @rootpath = rootpath end def call(env) ['REQUEST_PATH','PATH_INFO','REQUEST_URI','SCRIPT_NAME'].each do |key| if(env[key] =~ /[.]json([?].*)?$/) env[key].gsub!(/^\/#{@rootpath}/, "") end end @app.call(env) end end end
Version data entries
5 entries across 5 versions & 1 rubygems