Skip to content

Conversation

@antgamdia
Copy link
Contributor

@antgamdia antgamdia commented Dec 26, 2025

Description

This PR improves the handling of routes and paths when Trento is deployed and served from a subpath, such as foo.example.com/trento.

The rationale is: the reverse proxy adds the usual x-forwarded-prefix to set the subpath where it is being served. Later, TrentoWeb uses this header to calculate the script_name variable that Phoenix uses. The heex templates are updated to honor this variable as well. Finally, some minor tweaks are required on the frontend side, namely: 1) update the base URL in HTTP clients; 2) update some manual redirects (logging in/out) and 3) use relative URLs in some places.

Fixes TRNT-4139

How was this tested?

Unit tests, e2e tests, IRL tests.

Additional information

Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
@antgamdia antgamdia force-pushed the TRNT-4139-support-subpaths branch 2 times, most recently from 4ff1497 to c86d3d7 Compare January 12, 2026 16:55
@antgamdia antgamdia force-pushed the TRNT-4139-support-subpaths branch from c86d3d7 to cb63895 Compare January 12, 2026 17:13
Signed-off-by: Antonio Gamez Diaz <antonio.gamez@suse.com>
@antgamdia antgamdia force-pushed the TRNT-4139-support-subpaths branch from cb63895 to c71aece Compare January 12, 2026 17:55
@antgamdia antgamdia marked this pull request as ready for review January 13, 2026 08:57
@nelsonkopliku
Copy link
Member

Hey @antgamdia, porting here the summary of our private discussion.

While I believe trento would benefit from being able to be exposed in a subpath, I am also not feeling confident it pursuing this path at this very moment.

We'd need to take extra attention about at least the following:

  • systemd vs k8s installation
  • integration with identity providers
  • wanda needs also to be considered
  • thorough testing is necessary across different use cases and scenarios

If you ask me, I would defer any commitment on this at this stage 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants