Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix redirect

  • Loading branch information...
commit 2a61ca1b194157a41aeae4c6540c92fed0e45676 1 parent b2f3a36
Sven Fuchs svenfuchs authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 config.ru
5 config.ru
View
@@ -7,8 +7,9 @@ require 'travis/web'
class RedirectSubdomain < Struct.new(:app, :from)
def call(env)
- if Rack::Request.new(env).host == from
- [301, { 'Location' => 'https://travis-ci.org', 'Content-Type' => 'text/html' }, []]
+ request = Rack::Request.new(env)
+ if request.host == from
+ [301, { 'Location' => "https://travis-ci.org/#{request.fullpath}", 'Content-Type' => 'text/html' }, []]
else
app.call(env)
end
Please sign in to comment.
Something went wrong with that request. Please try again.