mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 04:33:11 +03:00
fix(chart): Added a condition, if analytics is disabled in the config, the collection will be
This commit is contained in:
parent
c26cedf5ed
commit
1a3c751abc
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ class PlausibleAnalytics:
|
||||||
async def __call__(self, request, call_next):
|
async def __call__(self, request, call_next):
|
||||||
response = await call_next(request)
|
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
|
return response
|
||||||
|
|
||||||
user_agent = request.headers.get('user-agent', 'unknown')
|
user_agent = request.headers.get('user-agent', 'unknown')
|
||||||
|
|
Loading…
Add table
Reference in a new issue