Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit fddf4d5

Browse files
authored
Merge pull request #440 from beyondcode/revert-115-stats-url
Revert "Add support for overriding stats logger's base URL"
2 parents 9d8e2ff + b2b2961 commit fddf4d5

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

config/websockets.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@
9292
*/
9393
'delete_statistics_older_than_days' => 60,
9494

95-
/*
96-
* By default, the websockets server attempts to connect to whatever
97-
* your APP_URL is set to. If running in a more complex environment,
98-
* you may wish to override the base URL for internal requests to
99-
* allow statistics to be collected.
100-
*/
101-
'base_url_override' => null,
102-
10395
/*
10496
* Use an DNS resolver to make the requests to the statistics logger
10597
* default is to resolve everything to 127.0.0.1.

src/Statistics/Logger/HttpStatisticsLogger.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function save()
7979
$this
8080
->browser
8181
->post(
82-
$this->storeStatisticsUrl(),
82+
action([WebSocketStatisticsEntriesController::class, 'store']),
8383
['Content-Type' => 'application/json'],
8484
stream_for(json_encode($postData))
8585
);
@@ -88,15 +88,4 @@ public function save()
8888
$statistic->reset($currentConnectionCount);
8989
}
9090
}
91-
92-
protected function storeStatisticsUrl(): string
93-
{
94-
$action = [WebSocketStatisticsEntriesController::class, 'store'];
95-
96-
$overridenUrl = config('websockets.statistics.base_url_override');
97-
98-
return $overridentUrl
99-
? $overridenUrl.action($action, [], false)
100-
: action($action);
101-
}
10291
}

0 commit comments

Comments
 (0)