Skip to content

Commit

Permalink
fix(ui): redirect '/index.html' to root '/'
Browse files Browse the repository at this point in the history
When directly accessing to /index.html, React router doesn't treat it as
root '/' so the default page resolution didn't happen. This fix changed
the React router routes to explicitly redirect '/index.html' to '/'.

This fix is needed for Spring Boot 3 runtime support.
  • Loading branch information
tadayosi committed Oct 3, 2023
1 parent 2c6d69f commit b0020bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/hawtio/src/ui/page/HawtioPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const HawtioPage: React.FunctionComponent = () => {
<Route key='help' path='help/*' element={<HawtioHelp />} />
<Route key='preferences' path='preferences/*' element={<HawtioPreferences />} />

<Route key='index' path='index.html' element={<Navigate to='/' />} />
<Route key='root' index element={defaultPage} />
</Routes>
</PluginNodeSelectionContext.Provider>
Expand Down

0 comments on commit b0020bd

Please sign in to comment.