Our setup is as follows:
Webseal/Apache reverse proxy (multiple location blocks)/gunicon and custom wsgi
As we are working with multiple location blocks in our Apache reverse proxy config, we need to use URL prefixes. These prefixes are defined as SCRIPT_NAME in our custom wsgi.
We have managed to get everything working except for dbadmin/grid.py (discussed in another post)
and the routing links in the _dashboard application.
The links are generated in the _dashboard/templates/index.html and they do not take the prefix or SCRIPT_NAME into account as they use absolute paths by default.
If they are converted to relative paths, then they are the prefixed first by _dashboard/static before the script_name prefix is applied.
This is the work_around which all of our customers need to apply to index.html:
Search for this line:
<td><a v-bind:href="route.rule" target="_blank"><tt>{{route.rule}}</tt></a></td>
and replace it with this line:
<td><a v-bind:href="'../../' + route.rule.replace(/^\/+/, '')" target="_blank"><tt>{{route.rule}}</tt></a></td>
My question is: Is there a cleaner way to fix this in py4web?