From b2b2961f0e29a012b424c1e7c4ec5f65a7ea488a Mon Sep 17 00:00:00 2001 From: rennokki Date: Thu, 13 Aug 2020 10:09:09 +0300 Subject: [PATCH] Revert "Add support for overriding stats logger's base URL" --- config/websockets.php | 8 -------- src/Statistics/Logger/HttpStatisticsLogger.php | 13 +------------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/config/websockets.php b/config/websockets.php index a0d1516da1..6a2e7f0379 100644 --- a/config/websockets.php +++ b/config/websockets.php @@ -92,14 +92,6 @@ */ '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 * default is to resolve everything to 127.0.0.1. diff --git a/src/Statistics/Logger/HttpStatisticsLogger.php b/src/Statistics/Logger/HttpStatisticsLogger.php index d7320253ef..1cc0201293 100644 --- a/src/Statistics/Logger/HttpStatisticsLogger.php +++ b/src/Statistics/Logger/HttpStatisticsLogger.php @@ -79,7 +79,7 @@ public function save() $this ->browser ->post( - $this->storeStatisticsUrl(), + action([WebSocketStatisticsEntriesController::class, 'store']), ['Content-Type' => 'application/json'], stream_for(json_encode($postData)) ); @@ -88,15 +88,4 @@ public function save() $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); - } }