[Feature] Add --ssl-ciphers CLI argument for TLS cipher control (#30937)

Signed-off-by: rickychen-infinirc <ricky.chen@infinirc.com>
This commit is contained in:
RickyChen / 陳昭儒
2026-01-23 01:53:24 +08:00
committed by GitHub
parent 3a63be0faa
commit 69d09fdd6c
2 changed files with 4 additions and 0 deletions

View File

@@ -961,6 +961,7 @@ async def run_server_worker(
ssl_certfile=args.ssl_certfile,
ssl_ca_certs=args.ssl_ca_certs,
ssl_cert_reqs=args.ssl_cert_reqs,
ssl_ciphers=args.ssl_ciphers,
h11_max_incomplete_event_size=args.h11_max_incomplete_event_size,
h11_max_header_count=args.h11_max_header_count,
**uvicorn_kwargs,

View File

@@ -132,6 +132,9 @@ class FrontendArgs:
"""Refresh SSL Context when SSL certificate files change"""
ssl_cert_reqs: int = int(ssl.CERT_NONE)
"""Whether client certificate is required (see stdlib ssl module's)."""
ssl_ciphers: str | None = None
"""SSL cipher suites for HTTPS (TLS 1.2 and below only).
Example: 'ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-CHACHA20-POLY1305'"""
root_path: str | None = None
"""FastAPI root_path when app is behind a path based routing proxy."""
middleware: list[str] = field(default_factory=lambda: [])