fix(chart): Added a condition, if analytics is disabled in the config, the collection will be

This commit is contained in:
Данил 2025-01-09 12:45:14 +03:00
parent c26cedf5ed
commit 1a3c751abc

View file

@ -23,7 +23,7 @@ class PlausibleAnalytics:
async def __call__(self, request, call_next):
response = await call_next(request)
if HTTPStatus(response.status_code).is_client_error:
if HTTPStatus(response.status_code).is_client_error or not config['analytics']['work']:
return response
user_agent = request.headers.get('user-agent', 'unknown')