mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 21:18:06 +02:00
have domain server report its ID at /id
This commit is contained in:
parent
8ca2a613a2
commit
dff5695965
1 changed files with 10 additions and 0 deletions
|
@ -1409,6 +1409,16 @@ bool DomainServer::handleHTTPRequest(HTTPConnection* connection, const QUrl& url
|
|||
return false;
|
||||
}
|
||||
|
||||
// check if this is a request for our domain ID
|
||||
const QString URI_ID = "/id";
|
||||
if (connection->requestOperation() == QNetworkAccessManager::GetOperation
|
||||
&& url.path() == URI_ID) {
|
||||
QUuid domainID = LimitedNodeList::getInstance()->getSessionUUID();
|
||||
|
||||
connection->respond(HTTPConnection::StatusCode200, uuidStringWithoutCurlyBraces(domainID).toLocal8Bit());
|
||||
return true;
|
||||
}
|
||||
|
||||
// all requests below require a cookie to prove authentication so check that first
|
||||
if (!isAuthenticatedRequest(connection, url)) {
|
||||
// this is not an authenticated request
|
||||
|
|
Loading…
Reference in a new issue