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

feat(gui): serve index from all paths without extension #5357

Merged
merged 4 commits into from Nov 24, 2022

Conversation

lahabana
Copy link
Contributor

@lahabana lahabana commented Nov 22, 2022

  • remove config.json
  • use a templated index.html to dynamically set base paths
  • serve index.html whenever the path points to a file that doesn't exist

Fix #5306

Signed-off-by: Charly Molter charly.molter@konghq.com

Checklist prior to review

  • Link to docs PR or issue --
  • Link to UI issue or PR --
  • Is the issue worked on linked? --
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests --
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

@lahabana lahabana requested a review from a team as a code owner November 22, 2022 09:35
- remove config.json
- use a templated index.html to dynamically set base paths
- serve index.html whenever the path doesn't have an extension

Fix kumahq#5306

Signed-off-by: Charly Molter <charly.molter@konghq.com>
@johncowen
Copy link
Contributor

serve index.html whenever the path doesn't have an extension

Not sure if I understood this correctly but does this mean that:

http://localhost:8080/mesh/default/data-planes/cluster-1.backend-02

would not serve index.html? (the path extension being .backend-02)

@kleinfreund
Copy link
Contributor

Not sure if I understood this correctly but does this mean that:

http://localhost:8080/mesh/default/data-planes/cluster-1.backend-02

would not serve index.html? (the path extension being .backend-02)

@johncowen I do believe that will indeed be an issue.

Signed-off-by: Charly Molter <charly.molter@konghq.com>
Signed-off-by: Charly Molter <charly.molter@konghq.com>
pkg/api-server/gui_handler.go Outdated Show resolved Hide resolved
pkg/api-server/gui_handler.go Show resolved Hide resolved
Signed-off-by: Charly Molter <charly.molter@konghq.com>
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.

Redirect requests to resources under the GUI path that aren’t static resources to the index.html file
4 participants