Gaoussin commited on
Commit
85b5b85
·
verified ·
1 Parent(s): 2ca5342

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -57,9 +57,9 @@ async def translate(req: TranslationRequest, request: Request):
57
  raise HTTPException(status_code=403, detail="Unauthorized API key")
58
 
59
  # ---- Optional IP restriction ----
60
- client_ip = request.client.host
61
- if ALLOWED_IPS and client_ip not in ALLOWED_IPS:
62
- raise HTTPException(status_code=403, detail="IP not allowed")
63
 
64
 
65
  # always set source language
 
57
  raise HTTPException(status_code=403, detail="Unauthorized API key")
58
 
59
  # ---- Optional IP restriction ----
60
+ #client_ip = request.client.host
61
+ #if ALLOWED_IPS and client_ip not in ALLOWED_IPS:
62
+ # raise HTTPException(status_code=403, detail="IP not allowed")
63
 
64
 
65
  # always set source language