fix: update frontend API key handling and improve export documentation

This commit is contained in:
Alexis
2026-05-19 09:52:50 +02:00
parent 8d29fb054d
commit 59eda988d2
8 changed files with 79 additions and 42 deletions
+4
View File
@@ -27,6 +27,10 @@ def _is_valid_key(provided: str | None) -> bool:
return hmac.compare_digest(provided.encode("utf-8"), settings.API_KEY_VALUE.encode("utf-8"))
def is_valid_api_key(provided: str | None) -> bool:
return _is_valid_key(provided)
def get_api_key(api_key: str | None = Depends(api_key_header)) -> str:
if not _is_valid_key(api_key):
raise HTTPException(