Skip to content

Commit

Permalink
Merge pull request #354 from canonical/fix/ui-redirect-for-fe
Browse files Browse the repository at this point in the history
fix: temporary fix to allow time for new solution on the frontend for UI redirect
  • Loading branch information
BarcoMasile authored Jul 11, 2024
2 parents b8e2279 + 6ee0ac3 commit af0842a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/ui/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ type API struct {
}

func (a *API) RegisterEndpoints(mux *chi.Mux) {
mux.Get(UIPrefix, a.uiFiles)
mux.Get(UIPrefix, func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, r.URL.Path+"/", http.StatusMovedPermanently)
})
mux.Get(UIPrefix+"/", a.uiFiles)
mux.Get(UIPrefix+"/*", a.uiFiles)
}

Expand Down

0 comments on commit af0842a

Please sign in to comment.