Ignore port when checking referrer

This commit is contained in:
AviKav 2020-07-05 16:41:43 -04:00
parent 5cfc5b4481
commit b87835bd18
No known key found for this signature in database
GPG key ID: 7BC4B96BC8A7167D

View file

@ -164,6 +164,7 @@ class ImageServer(
return allowedDomains.any { return allowedDomains.any {
referer.substringAfter("//") // Ignore scheme referer.substringAfter("//") // Ignore scheme
.substringBefore("/") // Ignore path .substringBefore("/") // Ignore path
.substringBefore(":")
.endsWith(it) .endsWith(it)
} }
} }