Add support for a client request prefix parameter to nbdiff-web #458
Description
I'm trying to run nbdiff on AWS Sagemaker (using Jupyter Lab) but running into this blocking problem.
Inside the Sagemaker environment, running an app on a port is automatically made available through a prefix appended to the the request string. So an nbdiff instance running on http://127.0.0.1:44021/difftool
would be made externally available at http://PUBLIC_HOST/proxy/44021/difftool
. This breaks the app however as it assumes the JavaScript asset nbdime.js
is located at /static/nbdime.js
when it's actually found at /proxy/44021/static/nbdime.js
. The same problem occurs within nbdime.js, where all the api requests assume the api endpoints are found at /api/
.
nbdiff-web
has the base-url
parameter, however this changes the prefix for both URL routes and also client requests, so this doesn't work. It seems like a separate request prefix param is required for when a web host has implicitly set a requests prefix.
Activity