generated from Grigo/AndroidTemplate
Initial commit: LoraTester Android + server
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"""Client identification for API endpoints."""
|
||||
|
||||
ANDROID_CLIENT_HEADER = "X-Lora-Client"
|
||||
ANDROID_CLIENT_VALUE = "android"
|
||||
|
||||
|
||||
def is_android_client(headers) -> bool:
|
||||
value = headers.get(ANDROID_CLIENT_HEADER) or headers.get(
|
||||
ANDROID_CLIENT_HEADER.lower()
|
||||
)
|
||||
return (value or "").strip().lower() == ANDROID_CLIENT_VALUE
|
||||
Reference in New Issue
Block a user