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

Can the baseURL of the UI be configured? #41

Open
gregwhorley opened this issue Sep 6, 2023 · 4 comments
Open

Can the baseURL of the UI be configured? #41

gregwhorley opened this issue Sep 6, 2023 · 4 comments

Comments

@gregwhorley
Copy link

Can I configure the base URL of the komoplane UI? I am currently using a reverse proxy that's already implemented in my employer's org and want to route traffic to a specific location (ex. myorg.dev.example.com/komoplane).

@undera
Copy link
Collaborator

undera commented Sep 6, 2023

It's not something that is configurable as of today, but I hear your request and will look onto how to fulfill it sooner.

@undera
Copy link
Collaborator

undera commented Sep 7, 2023

Note to myself: vitejs/vite#5081

@undera
Copy link
Collaborator

undera commented Sep 9, 2023

To reproduce, used following prompt to ChatGPT:

I want to write a simple Python proxy, need it to test some other project. The proxy should accept all HTTP requests starting with path "/subpath" and forward queries to "http://localhost:8090" to respective subpaths.

Took the resulting Python script and ran it. Worked flawlessly, reproduced the problem.

@undera
Copy link
Collaborator

undera commented Sep 10, 2023

I spent some time trying to fix this problem, here are the challenges I discovered:

  1. Due to the use of BrowserRouter, we have a problem of loading JS/CSS assets from index.html. Telling Vite to use ./ as base directory fixes the initial load, but not reloads of internal pages
  2. API calls suffer from the same problem, where relative path of page is different when viewing root page vs /claims vs concrete claim

For further fixing this:

  1. We may need to make base path configurable from helm chart values
  2. or We may switch to HashRouter, keeping in mind the need for drawer tabs to remember current tab in URL

This all will take a bit more time to address

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

No branches or pull requests

2 participants