Unverified Commit 69d09fdd authored by RickyChen / 陳昭儒's avatar RickyChen / 陳昭儒 Committed by GitHub
Browse files

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


Signed-off-by: default avatarrickychen-infinirc <ricky.chen@infinirc.com>
parent 3a63be0f
...@@ -961,6 +961,7 @@ async def run_server_worker( ...@@ -961,6 +961,7 @@ async def run_server_worker(
ssl_certfile=args.ssl_certfile, ssl_certfile=args.ssl_certfile,
ssl_ca_certs=args.ssl_ca_certs, ssl_ca_certs=args.ssl_ca_certs,
ssl_cert_reqs=args.ssl_cert_reqs, 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_incomplete_event_size=args.h11_max_incomplete_event_size,
h11_max_header_count=args.h11_max_header_count, h11_max_header_count=args.h11_max_header_count,
**uvicorn_kwargs, **uvicorn_kwargs,
......
...@@ -132,6 +132,9 @@ class FrontendArgs: ...@@ -132,6 +132,9 @@ class FrontendArgs:
"""Refresh SSL Context when SSL certificate files change""" """Refresh SSL Context when SSL certificate files change"""
ssl_cert_reqs: int = int(ssl.CERT_NONE) ssl_cert_reqs: int = int(ssl.CERT_NONE)
"""Whether client certificate is required (see stdlib ssl module's).""" """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 root_path: str | None = None
"""FastAPI root_path when app is behind a path based routing proxy.""" """FastAPI root_path when app is behind a path based routing proxy."""
middleware: list[str] = field(default_factory=lambda: []) middleware: list[str] = field(default_factory=lambda: [])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment