GET api update for image vector
This commit is contained in:
8
serve.py
8
serve.py
@@ -117,6 +117,14 @@ def _run() -> int:
|
||||
# an https request.
|
||||
proxy_headers=True,
|
||||
forwarded_allow_ips="*",
|
||||
# Request line + headers ceiling. h11's default is 16 KB, and the GET
|
||||
# form of the image search (GET /api/search/image-vector) carries a
|
||||
# 1024-float vector in the query string: 5.5 KB as base64, 8-10 KB
|
||||
# comma-separated - which with a browser's cookies and headers can
|
||||
# cross 16 KB and be dropped before the app sees it. 64 KB keeps that
|
||||
# working and is still a tight bound against header abuse. (The
|
||||
# keyword is uvicorn's; a rename would fail loudly here at boot.)
|
||||
h11_max_incomplete_event_size=64 * 1024,
|
||||
)
|
||||
uvicorn.Server(config).run(sockets=sockets)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user