| | | |
Offset 997, 120 lines modified | Offset 997, 14 lines modified |
997 | #·· | 997 | #·· |
998 | #··It·should·return·the·new·URL·to·redirect·to,·or·None·to·preserve·current | 998 | #··It·should·return·the·new·URL·to·redirect·to,·or·None·to·preserve·current |
999 | #··behavior. | 999 | #··behavior. |
1000 | #··Default:·None | 1000 | #··Default:·None |
1001 | #·c.JupyterHub.user_redirect_hook·=·None | 1001 | #·c.JupyterHub.user_redirect_hook·=·None |
| |
1002 | #------------------------------------------------------------------------------ | 1002 | #------------------------------------------------------------------------------ |
1003 | #·Proxy(LoggingConfigurable)·configuration | |
1004 | #------------------------------------------------------------------------------ | |
1005 | ##·Base·class·for·configurable·proxies·that·JupyterHub·can·use. | |
1006 | #·· | |
1007 | #··A·proxy·implementation·should·subclass·this·and·must·define·the·following | |
1008 | #··methods: | |
1009 | #·· | |
1010 | #··-·:meth:`.get_all_routes`·return·a·dictionary·of·all·JupyterHub-related·routes | |
1011 | #··-·:meth:`.add_route`·adds·a·route·-·:meth:`.delete_route`·deletes·a·route | |
1012 | #·· | |
1013 | #··In·addition·to·these,·the·following·method(s)·may·need·to·be·implemented: | |
1014 | #·· | |
1015 | #··-·:meth:`.start`·start·the·proxy,·if·it·should·be·launched·by·the·Hub | |
1016 | #····instead·of·externally·managed. | |
1017 | #····If·the·proxy·is·externally·managed,·it·should·set·:attr:`should_start`·to·False. | |
1018 | #··-·:meth:`.stop`·stop·the·proxy.·Only·used·if·:meth:`.start`·is·also·used. | |
1019 | #·· | |
1020 | #··And·the·following·method(s)·are·optional,·but·can·be·provided: | |
1021 | #·· | |
1022 | #··-·:meth:`.get_route`·gets·a·single·route. | |
1023 | #····There·is·a·default·implementation·that·extracts·data·from·:meth:`.get_all_routes`, | |
1024 | #····but·implementations·may·choose·to·provide·a·more·efficient·implementation | |
1025 | #····of·fetching·a·single·route. | |
| |
1026 | ##·Additional·routes·to·be·maintained·in·the·proxy. | |
1027 | #·· | |
1028 | #··A·dictionary·with·a·route·specification·as·key,·and·a·URL·as·target.·The·hub | |
1029 | #··will·ensure·this·route·is·present·in·the·proxy. | |
1030 | #·· | |
1031 | #··If·the·hub·is·running·in·host·based·mode·(with·JupyterHub.subdomain_host·set), | |
1032 | #··the·routespec·*must*·have·a·domain·component·(example.com/my-url/).·If·the·hub | |
1033 | #··is·not·running·in·host·based·mode,·the·routespec·*must·not*·have·a·domain | |
1034 | #··component·(/my-url/). | |
1035 | #·· | |
1036 | #··Helpful·when·the·hub·is·running·in·API-only·mode. | |
1037 | #··Default:·{} | |
1038 | #·c.Proxy.extra_routes·=·{} | |
| |
1039 | ##·Should·the·Hub·start·the·proxy | |
1040 | #·· | |
1041 | #··········If·True,·the·Hub·will·start·the·proxy·and·stop·it. | |
1042 | #··········Set·to·False·if·the·proxy·is·managed·externally, | |
1043 | #··········such·as·by·systemd,·docker,·or·another·service·manager. | |
1044 | #··Default:·True | |
1045 | #·c.Proxy.should_start·=·True | |
| |
1046 | #------------------------------------------------------------------------------ | |
1047 | #·ConfigurableHTTPProxy(Proxy)·configuration | |
1048 | #------------------------------------------------------------------------------ | |
1049 | ##·Proxy·implementation·for·the·default·configurable-http-proxy. | |
1050 | #·· | |
1051 | #··This·is·the·default·proxy·implementation·for·running·the·nodejs·proxy | |
1052 | #··`configurable-http-proxy`. | |
1053 | #·· | |
1054 | #··If·the·proxy·should·not·be·run·as·a·subprocess·of·the·Hub,·(e.g.·in·a·separate | |
1055 | #··container),·set:: | |
1056 | #·· | |
1057 | #······c.ConfigurableHTTPProxy.should_start·=·False | |
| |
1058 | ##·The·ip·(or·hostname)·of·the·proxy's·API·endpoint | |
1059 | #··Default:·'' | |
1060 | #·c.ConfigurableHTTPProxy.api_url·=·'' | |
| |
1061 | ##·The·Proxy·auth·token | |
1062 | #·· | |
1063 | #··········Loaded·from·the·CONFIGPROXY_AUTH_TOKEN·env·variable·by·default. | |
1064 | #··Default:·'' | |
1065 | #·c.ConfigurableHTTPProxy.auth_token·=·'' | |
| |
1066 | ##·Interval·(in·seconds)·at·which·to·check·if·the·proxy·is·running. | |
1067 | #··Default:·5 | |
1068 | #·c.ConfigurableHTTPProxy.check_running_interval·=·5 | |
| |
1069 | ##·The·command·to·start·the·proxy | |
1070 | #··Default:·['configurable-http-proxy'] | |
1071 | #·c.ConfigurableHTTPProxy.command·=·['configurable-http-proxy'] | |
| |
1072 | ##·The·number·of·requests·allowed·to·be·concurrently·outstanding·to·the·proxy | |
1073 | #·· | |
1074 | #··Limiting·this·number·avoids·potential·timeout·errors·by·sending·too·many | |
1075 | #··requests·to·update·the·proxy·at·once | |
1076 | #··Default:·10 | |
1077 | #·c.ConfigurableHTTPProxy.concurrency·=·10 | |
| |
1078 | ##·Add·debug-level·logging·to·the·Proxy. | |
1079 | #··Default:·False | |
1080 | #·c.ConfigurableHTTPProxy.debug·=·False | |
| |
1081 | ##· | |
1082 | #··See·also:·Proxy.extra_routes | |
1083 | #·c.ConfigurableHTTPProxy.extra_routes·=·{} | |
| |
1084 | ##·Proxy·log·level | |
1085 | #··Choices:·any·of·['debug',·'info',·'warn',·'error']·(case-insensitive) | |
1086 | #··Default:·'info' | |
1087 | #·c.ConfigurableHTTPProxy.log_level·=·'info' | |
| |
1088 | ##·File·in·which·to·write·the·PID·of·the·proxy·process. | |
1089 | #··Default:·'jupyterhub-proxy.pid' | |
1090 | #·c.ConfigurableHTTPProxy.pid_file·=·'jupyterhub-proxy.pid' | |
| |
1091 | ##·Should·the·Hub·start·the·proxy | |
1092 | #··See·also:·Proxy.should_start | |
1093 | #·c.ConfigurableHTTPProxy.should_start·=·True | |
| |
1094 | #------------------------------------------------------------------------------ | |
1095 | #·Authenticator(LoggingConfigurable)·configuration | 1003 | #·Authenticator(LoggingConfigurable)·configuration |
1096 | #------------------------------------------------------------------------------ | 1004 | #------------------------------------------------------------------------------ |
1097 | ##·Base·class·for·implementing·an·authentication·provider·for·JupyterHub | 1005 | ##·Base·class·for·implementing·an·authentication·provider·for·JupyterHub |
| |
1098 | ##·Set·of·users·that·will·be·granted·admin·rights·on·this·JupyterHub. | 1006 | ##·Set·of·users·that·will·be·granted·admin·rights·on·this·JupyterHub. |
1099 | #·· | 1007 | #·· |
1100 | #··Note: | 1008 | #··Note: |
Offset 1456, 28 lines modified | Offset 1350, 14 lines modified |
1456 | #·c.Authenticator.username_pattern·=·'' | 1350 | #·c.Authenticator.username_pattern·=·'' |
| |
1457 | ##·Deprecated,·use·`Authenticator.allowed_users` | 1351 | ##·Deprecated,·use·`Authenticator.allowed_users` |
1458 | #··Default:·set() | 1352 | #··Default:·set() |
1459 | #·c.Authenticator.whitelist·=·set() | 1353 | #·c.Authenticator.whitelist·=·set() |
| |
Max diff block lines reached; 6514/11410 bytes (57.09%) of diff not shown.
|