Skip to content

Instantly share code, notes, and snippets.

@syntruth
Last active August 29, 2015 13:57
Show Gist options
  • Save syntruth/9783290 to your computer and use it in GitHub Desktop.
Save syntruth/9783290 to your computer and use it in GitHub Desktop.
class RackPathInfoFix
def initialize(app)
@app = app
end
def call(env)
env['PATH_INFO'] = File.join(env['SCRIPT_NAME'], env['PATH_INFO'])
@app.call env
end
end
use RackPathInfoFix
map '/assets' do
run IPTApp.sprockets
end
map '/' do
run IPTApp
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment