diff --git a/jupyter_server_proxy/config.py b/jupyter_server_proxy/config.py index 4b21cf70..20d69070 100644 --- a/jupyter_server_proxy/config.py +++ b/jupyter_server_proxy/config.py @@ -79,8 +79,8 @@ def _default_path_info(self): class ServerProcess(Configurable): name = Unicode(help="Name of the server").tag(config=True) - command = List( - Unicode(), + command = Union( + [List(Unicode()), Callable()], help=""" An optional list of strings that should be the full command to be executed. The optional template arguments ``{port}``, ``{unix_socket}`` and ``{base_url}`` @@ -195,8 +195,8 @@ def _default_launcher_entry(self): """, ).tag(config=True) - request_headers_override = Dict( - Unicode(), + request_headers_override = Union( + [Dict(Unicode()), Callable()], default_value={}, help=""" A dictionary of additional HTTP headers for the proxy request. As with