Sha256: aec63b770d092df2046662aadd5631706e1a346a1d6429e1847f144483a224c8
Contents?: true
Size: 366 Bytes
Versions: 10
Compression:
Stored size: 366 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] =~ /[.]xml([?].*)?$/) env[key].gsub!(/^\/#{@rootpath}/, "") end end @app.call(env) end end end
Version data entries
10 entries across 10 versions & 1 rubygems