Skip to content

Commit

Permalink
[resotolib][feat] Support extra args to the webserver
Browse files Browse the repository at this point in the history
  • Loading branch information
lloesche committed Oct 2, 2023
1 parent 88d8b99 commit 7a91925
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resotolib/resotolib/web/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def __init__(
web_port: int = 9955,
ssl_cert: Optional[str] = None,
ssl_key: Optional[str] = None,
extra_config: Optional[dict] = None,
) -> None:
super().__init__()
self.name = "webserver"
Expand All @@ -20,6 +21,7 @@ def __init__(
self.web_port = web_port
self.ssl_cert = ssl_cert
self.ssl_key = ssl_key
self.extra_config = extra_config or {}

@property
def serving(self) -> bool:
Expand Down Expand Up @@ -69,6 +71,7 @@ def run(self) -> None:
"request.show_tracebacks": False,
"request.show_mismatched_params": False,
**ssl_args,
**self.extra_config,
}
}
)
Expand Down

0 comments on commit 7a91925

Please sign in to comment.