A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 17, 01:45 UTC
[Bugfix] Bypass authorization API token for preflight requests (#4862)
Pierre Dulac committed
May 16, 2024 at 18:42 UTC
9216b9cc38e8753de442877863ad651425902e1f
1 file changed
+2
vllm/entrypoints/openai/api_server.py
+2
@@ -154,6 +154,8 @@ if __name__ == "__main__":
154
@app.middleware("http")
155
async def authentication(request: Request, call_next):
156
root_path = "" if args.root_path is None else args.root_path
157
+ if request.method == "OPTIONS":
158
+ return await call_next(request)
159
if not request.url.path.startswith(f"{root_path}/v1"):
160
return await call_next(request)
161
if request.headers.get("Authorization") != "Bearer " + token: