use http_x_script_name header if given

This commit is contained in:
Sven Fuchs 2013-10-22 14:48:49 +02:00
parent c3f93b789b
commit be719b1253

View File

@ -106,6 +106,7 @@ module Travis::Api
use Rack::JSONP
use Rack::Config do |env|
env['SCRIPT_NAME'] = env['HTTP_X_SCRIPT_NAME'].to_s + env['SCRIPT_NAME'].to_s
env['travis.global_prefix'] = env['SCRIPT_NAME']
end