Reverse proxy to a Django app doesn't re-write the url properly

Hello,
I have containerized this app -

The reverse proxy doesn’t seem to re-write the app’s urls properly.
The main document is loaded, but js and other elements that come with it get 404 error.
I noticed it points elements to https://my.org.edu/how_to, instead of:
https://my.org.edu/rnode/somehost/port/how_to

What am I missing here?

Thank you.

You can get your app to use prefixes. You can set the prefix /rnode/somehost/port in some environment variable, then consume that environment variable in the application.

A quick google search indicates urlpatterns is the configuration option you’re looking for.Maybe FORCE_SCRIPT_NAME. I’m not familiar with Django/python, but there should be a way to prefix all URLs so that even assets are served under this base path.

I used the google search django url prefix

Thank you Jeff,

After tinkering with it for a couple of days with no success, I gave up and decided to deploy the app in a browser within a VNC session.
the browser (or any other app that I tried) doesn’t open in 1920x1080 resolution though, any ideas what could be the reason?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.