Skip to content

Conversation

@jamaljsr
Copy link
Member

@jamaljsr jamaljsr commented Jun 18, 2025

Summary

When running litd using a path-prefix (ex: PUBLIC_URL=/lit), the route navigation is not working properly. It navigates to /connect instead of /lit/connect. The fix was simply to ensure the new route is always prefixed with the PUBLIC_URL env var.

Screenshots

This is what currently happens when using a path prefix on master

litd-path-prefix-custom-session-broken.mp4

This shows the functioning flow when using this PR

litd-path-prefix-custom-session.mp4

Steps to Test

  1. Start the app with a path prefix
    cd app/
    PUBLIC_URL=/lit yarn start
    
  2. Navigate to http://localhost:3000/lit/connect
  3. Enter a name and choose "Custom" for the Permissions and click Next
  4. Modify the permissions however you like and click Submit
  5. Confirm you are redirected back to the LNC page without hitting any invalid url paths
  6. Restart the app without the path prefix
    yarn start
    
  7. Navigate to http://localhost:3000/connect (removed /lit prefix)
  8. Repeat steps 3-5 to confirm the flow works fine without a path prefix specified

Related Issues & Pull Requests

Closes #1058

When running litd using a path-prefix (ex: PUBLIC_URL=/lit), the route
navigation was not working properly. It would navigate to `/connect`
instead of `/lit/connect`. The fix was simply to ensure the new route
was always prefixed with the `PUBLIC_URL` env var.
@jamaljsr jamaljsr self-assigned this Jun 18, 2025
Copy link
Contributor

@itsrachelfish itsrachelfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK, confirmed I was able to navigate to the LNC custom settings page using a PUBLIC_URL prefix

Screenshot from 2025-06-18 03-38-54

Copy link
Contributor

@ViktorT-11 ViktorT-11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the fix 🙏. LGTM!

@ViktorT-11 ViktorT-11 merged commit 1d15b1e into master Jun 18, 2025
22 checks passed
@guggero guggero deleted the path-prefix-custom-session branch June 18, 2025 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LND Account: UI Navigation loosing basepath

4 participants