The way I was trying to get the /api/ calls routed correctly was with a cookie, that nginx would set and read; my understanding is that this would achieve the same result as setting `NotebookApp.base_url`, and my first attempts at setting this variable seem to confirm this conjecture, as I obtain the same result.
In an attempt to provide more context, here's the log of the jupyter instance for the same session
Apparently the /api/ calls do end up where I expect them to; however I am finding the `/login/` business a bit puzzling
my take on authentication, at this early stage at least, is to set the authentication token myself (simply as the docker name `flotbioinfo-x-mary` for now) by spawning jupyter with `--NotebookApp.token=$jupyter_token` and then pass this along to the redirected URL;
I am not exactly sure if this is supposed to be passed all along or not, could it be where I am screwing it up ?
[D 11:25:18.346 NotebookApp] Accepting token-authenticated connection from 172.17.0.1
[D 11:25:18.348 NotebookApp] Using contents: services/contents
[D 11:25:18.350 NotebookApp] 304 GET /notebooks/w1/en-w1-s07-c1-walking.ipynb?token=flotbioinfo-x-mary (172.17.0.1) 4.79ms
[D 11:25:18.448 NotebookApp] 304 GET /static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full,Safe&delayStartupUntil=configured (172.17.0.1) 1.21ms
[D 11:25:18.467 NotebookApp] 304 GET /custom/custom.css (172.17.0.1) 1.13ms
[D 11:25:18.579 NotebookApp] 304 GET /static/style/style.min.css.map (172.17.0.1) 1.18ms
[D 11:25:18.614 NotebookApp] 304 GET /static/components/MathJax/config/TeX-AMS_HTML-full.js?rev=2.6.0 (172.17.0.1) 1.17ms
[D 11:25:18.761 NotebookApp] 304 GET /static/notebook/js/main.min.js.map (172.17.0.1) 1.16ms
[D 11:25:18.813 NotebookApp] 304 GET /custom/custom.js?v=20170121111124 (172.17.0.1) 1.35ms
[D 11:25:18.857 NotebookApp] 304 GET /static/components/MathJax/config/Safe.js?rev=2.6.0 (172.17.0.1) 1.19ms
[I 11:25:18.913 NotebookApp] 302 GET /api/config/notebook?_=1484997918667 (172.17.0.1) 1.60ms
[I 11:25:18.940 NotebookApp] 302 GET /api/config/common?_=1484997918668 (172.17.0.1) 1.46ms
[I 11:25:18.961 NotebookApp] 302 GET /api/kernelspecs (172.17.0.1) 1.36ms
[I 11:25:18.967 NotebookApp] 302 GET /api/contents/w1/en-w1-s07-c1-walking.ipynb?type=notebook&_=1484997918669 (172.17.0.1) 1.41ms
[D 11:25:18.996 NotebookApp] 304 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.6.0 (172.17.0.1) 1.19ms
[D 11:25:19.021 NotebookApp] 304 GET /static/components/MathJax/extensions/Safe.js?rev=2.6.0 (172.17.0.1) 1.10ms
[D 11:25:19.029 NotebookApp] Using contents: services/contents
[D 11:25:19.030 NotebookApp] 200 GET /login?next=%2Fapi%2Fconfig%2Fnotebook%3F_%3D1484997918667 (172.17.0.1) 2.65ms
[D 11:25:19.053 NotebookApp] Using contents: services/contents
[D 11:25:19.055 NotebookApp] 200 GET /login?next=%2Fapi%2Fconfig%2Fcommon%3F_%3D1484997918668 (172.17.0.1) 2.81ms
[D 11:25:19.068 NotebookApp] Using contents: services/contents
[D 11:25:19.069 NotebookApp] 200 GET /login?next=%2Fapi%2Fkernelspecs (172.17.0.1) 2.67ms
[D 11:25:19.077 NotebookApp] Using contents: services/contents
[D 11:25:19.079 NotebookApp] 200 GET /login?next=%2Fapi%2Fcontents%2Fw1%2Fen-w1-s07-c1-walking.ipynb%3Ftype%3Dnotebook%26_%3D1484997918669 (172.17.0.1) 2.60ms