EDU-3424 Enable About service for all subdomains of hyperskill.org

GitOrigin-RevId: 6128568d9a6a477e1d3bbed3c1a163ccf3918b47
This commit is contained in:
Liana Bakradze
2020-06-23 12:39:53 +03:00
committed by intellij-monorepo-bot
parent 17e328c211
commit b2c6daba06
@@ -66,7 +66,7 @@ internal class AboutHttpService : RestService() {
private fun isTrustedOrigin(request: HttpRequest): Boolean {
val origin = request.origin ?: return false
@Suppress("SpellCheckingInspection")
return origin == "hyperskill.org"
return origin.matches("https?://([a-z0-9-]+\\.)*hyperskill.org$".toRegex())
}
fun writeApplicationInfoJson(out: OutputStream, urlDecoder: QueryStringDecoder?) {