From 9d95f1dbba74e5013bd4a035432e86ca6681541c Mon Sep 17 00:00:00 2001 From: Robert DeCaire Date: Tue, 24 Sep 2019 11:16:21 -0400 Subject: [PATCH] (Scala) Allow 'android-app' URL scheme (closes #90) --- .../scala/com/snowplowanalytics/refererparser/Parser.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/snowplowanalytics/refererparser/Parser.scala b/src/main/scala/com/snowplowanalytics/refererparser/Parser.scala index 0765697..0ad73ee 100644 --- a/src/main/scala/com/snowplowanalytics/refererparser/Parser.scala +++ b/src/main/scala/com/snowplowanalytics/refererparser/Parser.scala @@ -93,7 +93,9 @@ class Parser private[refererparser] (referers: Map[String, RefererLookup]) { val path = refererUri.getPath val query = Option(refererUri.getRawQuery) - val validUri = (scheme == "http" || scheme == "https") && host != null && path != null + val validSchemes = Seq("http", "https", "android-app") + + val validUri = validSchemes.contains(scheme) && host != null && path != null if (validUri) { if (// Check for internal domains