Revert "Add support for overriding stats logger's base URL"
This commit is contained in:
parent
9d8e2ff323
commit
b2b2961f0e
|
|
@ -92,14 +92,6 @@ return [
|
||||||
*/
|
*/
|
||||||
'delete_statistics_older_than_days' => 60,
|
'delete_statistics_older_than_days' => 60,
|
||||||
|
|
||||||
/*
|
|
||||||
* By default, the websockets server attempts to connect to whatever
|
|
||||||
* your APP_URL is set to. If running in a more complex environment,
|
|
||||||
* you may wish to override the base URL for internal requests to
|
|
||||||
* allow statistics to be collected.
|
|
||||||
*/
|
|
||||||
'base_url_override' => null,
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use an DNS resolver to make the requests to the statistics logger
|
* Use an DNS resolver to make the requests to the statistics logger
|
||||||
* default is to resolve everything to 127.0.0.1.
|
* default is to resolve everything to 127.0.0.1.
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ class HttpStatisticsLogger implements StatisticsLogger
|
||||||
$this
|
$this
|
||||||
->browser
|
->browser
|
||||||
->post(
|
->post(
|
||||||
$this->storeStatisticsUrl(),
|
action([WebSocketStatisticsEntriesController::class, 'store']),
|
||||||
['Content-Type' => 'application/json'],
|
['Content-Type' => 'application/json'],
|
||||||
stream_for(json_encode($postData))
|
stream_for(json_encode($postData))
|
||||||
);
|
);
|
||||||
|
|
@ -88,15 +88,4 @@ class HttpStatisticsLogger implements StatisticsLogger
|
||||||
$statistic->reset($currentConnectionCount);
|
$statistic->reset($currentConnectionCount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function storeStatisticsUrl(): string
|
|
||||||
{
|
|
||||||
$action = [WebSocketStatisticsEntriesController::class, 'store'];
|
|
||||||
|
|
||||||
$overridenUrl = config('websockets.statistics.base_url_override');
|
|
||||||
|
|
||||||
return $overridentUrl
|
|
||||||
? $overridenUrl.action($action, [], false)
|
|
||||||
: action($action);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue