mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-16 11:46:00 +08:00
[Frontend] update priority for --api-key and VLLM_API_KEY (#15588)
Signed-off-by: reidliu41 <reid201711@gmail.com> Co-authored-by: reidliu41 <reid201711@gmail.com>
This commit is contained in:
parent
3bbaacbe15
commit
fd5fd26902
@ -818,7 +818,8 @@ def build_app(args: Namespace) -> FastAPI:
|
||||
return JSONResponse(err.model_dump(),
|
||||
status_code=HTTPStatus.BAD_REQUEST)
|
||||
|
||||
if token := envs.VLLM_API_KEY or args.api_key:
|
||||
# Ensure --api-key option from CLI takes precedence over VLLM_API_KEY
|
||||
if token := args.api_key or envs.VLLM_API_KEY:
|
||||
|
||||
@app.middleware("http")
|
||||
async def authentication(request: Request, call_next):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user