99from collections import namedtuple
1010from .utils import call_with_asked_args
1111
12- def _make_serverproxy_handler (name , command , environment , timeout , absolute_url , port , indexpage ):
12+ def _make_serverproxy_handler (name , command , environment , timeout , absolute_url , port , mappath ):
1313 """
1414 Create a SuperviseAndProxyHandler subclass with given parameters
1515 """
@@ -21,7 +21,7 @@ def __init__(self, *args, **kwargs):
2121 self .proxy_base = name
2222 self .absolute_url = absolute_url
2323 self .requested_port = port
24- self .indexpage = indexpage
24+ self .mappath = mappath
2525
2626 @property
2727 def process_args (self ):
@@ -83,7 +83,7 @@ def make_handlers(base_url, server_processes):
8383 sp .timeout ,
8484 sp .absolute_url ,
8585 sp .port ,
86- sp .indexpage ,
86+ sp .mappath ,
8787 )
8888 handlers .append ((
8989 ujoin (base_url , sp .name , r'(.*)' ), handler , dict (state = {}),
@@ -95,7 +95,7 @@ def make_handlers(base_url, server_processes):
9595
9696LauncherEntry = namedtuple ('LauncherEntry' , ['enabled' , 'icon_path' , 'title' ])
9797ServerProcess = namedtuple ('ServerProcess' , [
98- 'name' , 'command' , 'environment' , 'timeout' , 'absolute_url' , 'port' , 'indexpage ' , 'launcher_entry' ])
98+ 'name' , 'command' , 'environment' , 'timeout' , 'absolute_url' , 'port' , 'mappath ' , 'launcher_entry' ])
9999
100100def make_server_process (name , server_process_config ):
101101 le = server_process_config .get ('launcher_entry' , {})
@@ -106,7 +106,7 @@ def make_server_process(name, server_process_config):
106106 timeout = server_process_config .get ('timeout' , 5 ),
107107 absolute_url = server_process_config .get ('absolute_url' , False ),
108108 port = server_process_config .get ('port' , 0 ),
109- indexpage = server_process_config .get ('indexpage ' , '' ),
109+ mappath = server_process_config .get ('mappath ' , '' ),
110110 launcher_entry = LauncherEntry (
111111 enabled = le .get ('enabled' , True ),
112112 icon_path = le .get ('icon_path' ),
@@ -147,10 +147,10 @@ class ServerProxy(Configurable):
147147 port
148148 Set the port that the service will listen on. The default is to automatically select an unused port.
149149
150- indexpage
151- If the root of the service is requested return this page instead .
152- This is often referred to in web-server configurations as the index
153- page .
150+ mappath
151+ Map request paths to proxied paths .
152+ Either a dictionary of request paths to proxied paths,
153+ or a callable that takes parameter ``path`` and returns the proxied path .
154154
155155 launcher_entry
156156 A dictionary of various options for entries in classic notebook / jupyterlab launchers.
0 commit comments