fix: Add null check for headers
All checks were successful
Build Docker / BuildImage (push) Successful in 28s
All checks were successful
Build Docker / BuildImage (push) Successful in 28s
This commit is contained in:
parent
6c004d14bd
commit
99b63592d0
@ -359,6 +359,7 @@ def index():
|
|||||||
loaded = True
|
loaded = True
|
||||||
|
|
||||||
# Check if crawler
|
# Check if crawler
|
||||||
|
if request.headers:
|
||||||
if "Googlebot" not in request.headers.get(
|
if "Googlebot" not in request.headers.get(
|
||||||
"User-Agent"
|
"User-Agent"
|
||||||
) and "Bingbot" not in request.headers.get("User-Agent"):
|
) and "Bingbot" not in request.headers.get("User-Agent"):
|
||||||
|
Loading…
Reference in New Issue
Block a user