fix: Cleanup blueprint names and add tests
All checks were successful
Build Docker / BuildImage (push) Successful in 2m17s
All checks were successful
Build Docker / BuildImage (push) Successful in 2m17s
This commit is contained in:
6
tools.py
6
tools.py
@@ -35,7 +35,7 @@ def getGitCommit():
|
||||
|
||||
def isCurl(request: Request) -> bool:
|
||||
"""
|
||||
Check if the request is from curl
|
||||
Check if the request is from curl or hurl
|
||||
|
||||
Args:
|
||||
request (Request): The Flask request object
|
||||
@@ -45,7 +45,9 @@ def isCurl(request: Request) -> bool:
|
||||
"""
|
||||
if request.headers and request.headers.get("User-Agent"):
|
||||
# Check if curl
|
||||
if "curl" in request.headers.get("User-Agent", "curl"):
|
||||
if "curl" in request.headers.get("User-Agent", ""):
|
||||
return True
|
||||
if "hurl" in request.headers.get("User-Agent",""):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user