In my scenario base_url is used when running nbmergetool under git mergetool, and jupyterlab server proxy is used as a proxy.
nbmerge_config.json:
{
"NbMergeTool": {
"base_url": "/proxy/absolute/8182/",
"port": 8182,
"browser": "-" ### just to skip loading browser tab, as it is opened manually (so far, for another reason)
}
}
nbdime web page loads fine, it allows to resolve conflicts and save the result, but pushing Close Tool button attempts to access /api/closetool endpoint instead of /proxy/absolute/8182/api/closetool. So user needs to manually close the resolving tab in browser and stop git mergetool --tool nbdime process.
In my scenario
base_url
is used when running nbmergetool undergit mergetool
, and jupyterlab server proxy is used as a proxy.nbmerge_config.json:
nbdime web page loads fine, it allows to resolve conflicts and save the result, but pushing Close Tool button attempts to access /api/closetool endpoint instead of /proxy/absolute/8182/api/closetool. So user needs to manually close the resolving tab in browser and stop
git mergetool --tool nbdime
process.As far as I can understand the reason is that base_url is honoured when saving notebook https://github.com/jupyter/nbdime/blob/3.0.0b1/packages/webapp/src/app/merge.ts#L267-L269, but is ignored when sending closetool notification https://github.com/jupyter/nbdime/blob/3.0.0b1/packages/webapp/src/app/common.ts#L224-L225
So I guess the fix may be rather easy there, just prepend that base_url in closeTool function.