From 3da41021b19d3fd3ce1d939ff15064fe9e38df41 Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Fri, 20 Dec 2024 17:42:25 +0000 Subject: [PATCH] don't report check pings --- pygeoapi/flask_app.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pygeoapi/flask_app.py b/pygeoapi/flask_app.py index 9a7a3ba..7af7d7a 100644 --- a/pygeoapi/flask_app.py +++ b/pygeoapi/flask_app.py @@ -182,10 +182,11 @@ def handle_client(url_route: str): else: ip_address = request.environ['HTTP_X_FORWARDED_FOR'] - print(f"_______________________{datetime.now().astimezone(timezone.utc)} _URL access") - print(f"_Agent {url_route}: {agent}") - print(f"_IP Address: {ip_address}") - print(f"_Request URL: {request.url}") + if "(https://www.checklyhq.com)" not in agent: + print(f"_______________________{datetime.now().astimezone(timezone.utc)} _URL access") + print(f"_Agent {url_route}: {agent}") + print(f"_IP Address: {ip_address}") + print(f"_Request URL: {request.url}") request.url += f"&userAgent={agent}"