fix: Use header.get instead of user agent
All checks were successful
Build Docker / BuildImage (push) Successful in 44s
All checks were successful
Build Docker / BuildImage (push) Successful in 44s
This commit is contained in:
parent
cdb7eb86a5
commit
3e4d5c2633
@ -342,8 +342,8 @@ def index():
|
|||||||
|
|
||||||
# Check if crawler
|
# Check if crawler
|
||||||
if (
|
if (
|
||||||
"Googlebot" not in request.user_agent.browser
|
"Googlebot" not in request.headers.get("User-Agent")
|
||||||
and "Bingbot" not in request.user_agent.browser
|
and "Bingbot" not in request.headers.get("User-Agent")
|
||||||
):
|
):
|
||||||
# Check if cookie is set
|
# Check if cookie is set
|
||||||
if not request.cookies.get("loaded") and not loaded:
|
if not request.cookies.get("loaded") and not loaded:
|
||||||
|
Loading…
Reference in New Issue
Block a user