CORS troubleshooting
This commit is contained in:
@@ -20,6 +20,13 @@ async def get_api_key(
|
||||
# Use header if provided, otherwise fallback to query param
|
||||
api_key = api_key_h or api_key_q
|
||||
|
||||
# DEBUG LOGGING FOR 403 TROUBLESHOOTING
|
||||
print(f"DEBUG: Auth Check - Header: {'Yes' if api_key_h else 'No'}, Query: {'Yes' if api_key_q else 'No'}")
|
||||
if api_key:
|
||||
print(f"DEBUG: API Key received (prefix): {api_key[:5]}...")
|
||||
else:
|
||||
print("DEBUG: API Key is MISSING from both header and query params")
|
||||
|
||||
if not api_key:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
|
||||
Reference in New Issue
Block a user