@@ -152,8 +152,8 @@ For example, RStudio uses the term _frame origin_ and require the flag
152
152
One of:
153
153
154
154
- A dictionary of strings that are passed in as HTTP headers to the proxy
155
- request. The strings ` {port} ` and ` {base_url} ` will be replaced as
156
- for ** command** .
155
+ request. The strings ` {port} ` , ` {unix_socket} ` and ` {base_url} ` will be
156
+ replaced as for ** command** .
157
157
- A callable that takes any {ref}` callable arguments <server-process:callable-arguments> ` ,
158
158
and returns a dictionary of strings that are used & treated same as above.
159
159
@@ -181,9 +181,11 @@ server as raw stream data. This is similar to running a
181
181
[ websockify] ( https://github.com/novnc/websockify ) wrapper.
182
182
All other HTTP requests return 405.
183
183
184
- #### Callable arguments
184
+ ### Callable arguments
185
185
186
- Any time you specify a callable in the config, it can ask for any arguments it needs
186
+ Certain config options accept callables, as documented above. This should return
187
+ the same type of object that the option normally expects.
188
+ When you use a callable this way, it can ask for any arguments it needs
187
189
by simply declaring it - only arguments the callable asks for will be passed to it.
188
190
189
191
For example, with the following config:
@@ -213,13 +215,18 @@ The `port` argument will be passed to the callable. This is a simple form of dep
213
215
injection that helps us add more parameters in the future without breaking backwards
214
216
compatibility.
215
217
216
- ##### Available arguments
218
+ #### Available arguments
217
219
218
- Currently, the following arguments are available:
220
+ Unless otherwise documented for specific options, the arguments available for
221
+ callables are:
219
222
220
223
1 . ** port**
221
- The port the command should listen on
222
- 2 . ** base_url**
224
+ The TCP port on which the server should listen, or is listening.
225
+ This is 0 if a Unix socket is used instead of TCP.
226
+ 2 . ** unix_socket**
227
+ The path of a Unix socket on which the server should listen, or is listening.
228
+ This is an empty string if a TCP socket is used.
229
+ 3 . ** base_url**
223
230
The base URL of the notebook
224
231
225
232
If any of the returned strings, lists or dictionaries contain strings
0 commit comments