try setting set :prefixed_redirects, true
with Sinatra
(it should than use rack.env['SCRIPT_NAME']
with redirects)
UPDATE: even without the set :prefixed_redirects, true
(default is false
) works perfectly fine under Trinidad (which should behave the same as Warbler since bot use JRuby-Rack) ... request.env['SCRIPT_NAME']
is set to the /context_path
correctly.
I would try updating (if they're not the latest) JRuby-Rack/Warbler as well as Sinatra as a last resort, otherwise this probably needs a detailed look at what's going on (esp. if SCRIPT_NAME is set correctly).