mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 09:54:11 +02:00
only could a url as a domain if it ends with .domain.json
This commit is contained in:
parent
f80ee1286d
commit
1f5a65f93e
1 changed files with 13 additions and 2 deletions
|
@ -517,8 +517,19 @@ bool isDomainURL(QUrl url) {
|
|||
if (!url.isValid()) {
|
||||
return false;
|
||||
}
|
||||
// XXX check ending of path
|
||||
return url.scheme() == HIFI_URL_SCHEME || url.scheme() == "file" || url.scheme() == "http" || url.scheme() == "https";
|
||||
if (url.scheme() != HIFI_URL_SCHEME &&
|
||||
url.scheme() != "file" &&
|
||||
url.scheme() != "http" &&
|
||||
url.scheme() != "https") {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (url.path().endsWith(".domain.json", Qt::CaseInsensitive) ||
|
||||
url.path().endsWith(".domain.json.gz", Qt::CaseInsensitive)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
Loading…
Reference in a new issue