fix: Use header.get instead of user agent
All checks were successful
Build Docker / BuildImage (push) Successful in 44s

This commit is contained in:
Nathan Woodburn 2024-09-02 19:56:57 +10:00
parent cdb7eb86a5
commit 3e4d5c2633
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -342,8 +342,8 @@ def index():
# Check if crawler
if (
"Googlebot" not in request.user_agent.browser
and "Bingbot" not in request.user_agent.browser
"Googlebot" not in request.headers.get("User-Agent")
and "Bingbot" not in request.headers.get("User-Agent")
):
# Check if cookie is set
if not request.cookies.get("loaded") and not loaded: