Fix whitelist auth check for localhost

This commit is contained in:
Piotr Sarnacki 2012-12-09 23:46:12 +01:00
parent 65775bbc59
commit 88363423f4

View File

@ -256,7 +256,7 @@ class Travis::Api::App
return unless uri = Addressable::URI.parse(target_origin)
if uri.host =~ /\A(.+\.)?travis-ci\.(com|org)\Z/
uri.scheme == 'https'
elsif uri == 'localhost' or uri == '127.0.0.1'
elsif uri.host == 'localhost' or uri.host == '127.0.0.1'
uri.port > 1023
end
end