mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
updated inbound raw size to the request size
This commit is contained in:
+4
-11
@@ -720,18 +720,11 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server,
|
||||
throw new Exception(Exception::REALTIME_TOO_MANY_MESSAGES, 'Too many requests');
|
||||
}
|
||||
|
||||
// Record realtime inbound bytes for this project (WS handshake + query params)
|
||||
try {
|
||||
$rawSize = $request->getSize();
|
||||
} catch (Throwable) {
|
||||
$rawSize = \strlen((string) $request->getURI());
|
||||
}
|
||||
$rawSize = $request->getSize();
|
||||
|
||||
if ($rawSize > 0) {
|
||||
triggerStats([
|
||||
METRIC_REALTIME_INBOUND => $rawSize,
|
||||
], $project->getId());
|
||||
}
|
||||
triggerStats([
|
||||
METRIC_REALTIME_INBOUND => $rawSize,
|
||||
], $project->getId());
|
||||
|
||||
/*
|
||||
* Validate Client Domain - Check to avoid CSRF attack.
|
||||
|
||||
Reference in New Issue
Block a user