Skip to content

Commit

Permalink
Ruby: allow 'android-app' url scheme (closes #178)
Browse files Browse the repository at this point in the history
  • Loading branch information
turino authored and BenFradet committed Mar 15, 2018
1 parent 6e49a74 commit 37d8778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ruby/lib/referer-parser/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def optimize_index!
def parse(obj)
url = obj.is_a?(URI) ? obj : URI.parse(obj.to_s)

if !['http', 'https'].include?(url.scheme)
raise InvalidUriError.new("Only HTTP and HTTPS schemes are supported -- #{url.scheme}")
if !['android-app', 'http', 'https'].include?(url.scheme)
raise InvalidUriError.new("Only Android-App, HTTP, and HTTPS schemes are supported -- #{url.scheme}")
end

data = { :known => false, :uri => url.to_s }
Expand Down

0 comments on commit 37d8778

Please sign in to comment.