Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React App routes and hrefs are broken #350

Open
BarcoMasile opened this issue Jul 10, 2024 · 1 comment
Open

React App routes and hrefs are broken #350

BarcoMasile opened this issue Jul 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@BarcoMasile
Copy link
Contributor

BarcoMasile commented Jul 10, 2024

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.

@BarcoMasile BarcoMasile added the bug Something isn't working label Jul 10, 2024
Copy link

Thank you for reporting us your feedback!

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

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant