Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -381,6 +381,7 @@ async def authenticate_client(
|
|
381 |
detail="服务不可用: 服务器未配置客户端API密钥。",
|
382 |
)
|
383 |
|
|
|
384 |
if not auth or not auth.credentials:
|
385 |
raise HTTPException(
|
386 |
status_code=401,
|
@@ -390,6 +391,7 @@ async def authenticate_client(
|
|
390 |
|
391 |
if auth.credentials not in VALID_CLIENT_KEYS:
|
392 |
raise HTTPException(status_code=403, detail="无效的客户端API密钥。")
|
|
|
393 |
|
394 |
|
395 |
@app.on_event("startup")
|
|
|
381 |
detail="服务不可用: 服务器未配置客户端API密钥。",
|
382 |
)
|
383 |
|
384 |
+
'''
|
385 |
if not auth or not auth.credentials:
|
386 |
raise HTTPException(
|
387 |
status_code=401,
|
|
|
391 |
|
392 |
if auth.credentials not in VALID_CLIENT_KEYS:
|
393 |
raise HTTPException(status_code=403, detail="无效的客户端API密钥。")
|
394 |
+
'''
|
395 |
|
396 |
|
397 |
@app.on_event("startup")
|