canonical / identity-platform-admin-ui

Admin UI for the Canonical identity broker and identity provider solution
Other
6 stars 4 forks source link

React App routes and hrefs are broken #350

Open BarcoMasile opened 2 months ago

BarcoMasile commented 2 months ago

Description

Right now the Frontend app gets served by the UI correctly at ${contextPath}/ui (UI_PREFIX from now on). But right after it gets loaded things start to break. Assets URLs are not correct, where they don't present the expected UI_PREFIX but they end up starting from the root /.

Perform the login at /api/v0/auth, wait for the redirection after login: image

As you can see the assets are not downloaded correctly. Upon further inspection, you can see that the URL requested for each asset doens't include the /ui prefix.

Go into the browser and add a trailing slash to the URL and see the following (Success): image image

EDIT after chat with @nsklikas : This is fixed correctly by changing the makefile under the ui folder to present $(YARN) build --base=/ui Unfortunately this will break the Charm since it's deployed behind Traefik.

syncronize-issues-to-jira[bot] commented 2 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-951.

This message was autogenerated