From 73213153fe72d8416ebca3b707d5cda68fcd17c8 Mon Sep 17 00:00:00 2001 From: Henrik Hodne Date: Wed, 24 Jul 2013 16:02:32 -0700 Subject: [PATCH] Fix secure.travis-ci.org redirect `fullpath` starts with SCRIPT_NAME. From the Rack spec: > The SCRIPT_NAME, if non-empty, must start with / Fixes travis-ci/travis-ci#1278. --- config.ru | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.ru b/config.ru index f3272ca3..b9a55f43 100644 --- a/config.ru +++ b/config.ru @@ -9,7 +9,7 @@ class RedirectSubdomain < Struct.new(:app, :from) def call(env) request = Rack::Request.new(env) if request.host == from - [301, { 'Location' => "https://travis-ci.org/#{request.fullpath}", 'Content-Type' => 'text/html' }, []] + [301, { 'Location' => "https://travis-ci.org#{request.fullpath}", 'Content-Type' => 'text/html' }, []] else app.call(env) end