diff --git a/.gitignore b/.gitignore index 00ba0bd..7191135 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ access_log -error_log +error_log* # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/pygeoapi/flask_app.py b/pygeoapi/flask_app.py index 44aae7a..8bc9635 100644 --- a/pygeoapi/flask_app.py +++ b/pygeoapi/flask_app.py @@ -200,7 +200,9 @@ def landing_page(): browser_list = ["Chrome", "Safari", "Firefox", "Edg/", "Trident/"] print(agent) - if "YaBrowser/" in agent: + if agent is None: + return error_screen("User-Agent not specified") + elif "YaBrowser/" in agent or "yandex" in agent.lower(): raise ValueError("Your browser is not supported.") for br in browser_list: if br in agent: