Address feedback

This commit is contained in:
Ashwin Bharambe 2025-02-07 09:11:15 -08:00
parent e23213ee8a
commit 997b097e26
2 changed files with 4 additions and 5 deletions

View file

@ -121,6 +121,8 @@ class ServerConfig(BaseModel):
port: int = Field(
default=8321,
description="Port to listen on",
ge=1024,
le=65535,
)
ssl_certfile: Optional[str] = Field(
default=None,

View file

@ -285,19 +285,16 @@ def main():
parser.add_argument(
"--ssl-keyfile",
help="Path to SSL key file for HTTPS",
required="--ssl-certfile" in sys.argv,
)
parser.add_argument(
"--ssl-certfile",
help="Path to SSL certificate file for HTTPS",
required="--ssl-keyfile" in sys.argv,
)
args = parser.parse_args()
if args.ssl_keyfile and not args.ssl_certfile:
parser.error("You must provide both --ssl-keyfile and --ssl-certfile when using HTTPS")
if args.ssl_certfile and not args.ssl_keyfile:
parser.error("You must provide both --ssl-keyfile and --ssl-certfile when using HTTPS")
if args.env:
for env_pair in args.env:
try: