Using jupyter jupyter-server-proxy to serve meteor app

Hi, i need a dynamic way for users to spin up a meteor app (not mine) on demand. As we already use jupyterhub with kubernetes ‘spawners’, i noticed that there is a project that allows (in my case) to spin up a dockerised instance of the app and use jupyter-server-proxy to forward the traffic from the hub to the containerised meteor app. basically, i just ensure i run a jupyterlab+jupyter-server-proxy instance along side the running meteor app within the container… but…

after spinning up the container via jupyterhub, if i goto

https://example.com/hub/user-redirect/proxy/39000

i get redirect to

 /user/ytl/proxy/39000

which is the meteor app… so far so good.

however, meteor then attempts to load its javascripts at:

https://example.com/bee5194516e3c0f0626ac0d188c87ed28d1a257a.js?meteor_js_resource=true

which ultimately fail as it gets redirected to

/hub/bee5194516e3c0f0626ac0d188c87ed28d1a257a.js?meteor_js_resource=true

which is incorrect. it should redirect to /hub/user-redirect/proxy/39000.

ie:

https://example.com/hub/user-redirect/proxy/39000/bee5194516e3c0f0626ac0d188c87ed28d1a257a.js?meteor_js_resource=true

does a redirect to:
https://example.com/user/ytl/proxy/39000/bee5194516e3c0f0626ac0d188c87ed28d1a257a.js?meteor_js_resource=true

but does load the javascript.

from what i understand from meteor, i can overload the relative path of the app via it’s ROOT_URL environment, however settting

ROOT_URL="https://example.com/hub/user-redirect/proxy/3900/"

and then going to

https://example.com/hub/user-redirect/proxy/39000 -> example.com/user/ytl/proxy/39000

returns a 404.

i am of course, assuming that all of the meteor magic can be proxied in this manner… any suggestions?

cheers,