Skip to content

Commit

Permalink
ensure RoutePrefix ends in trailing slash
Browse files Browse the repository at this point in the history
Signed-off-by: kwilt <[email protected]>
  • Loading branch information
kwilt committed Jan 13, 2025
1 parent 15f17b6 commit a81341a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/landing_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ func NewLandingPage(c LandingConfig) (*LandingPageHandler, error) {
}
if c.RoutePrefix == "" {
c.RoutePrefix = "/"
} else if !strings.HasSuffix(c.RoutePrefix, "/") {
c.RoutePrefix += "/"
}
// Strip leading '/' from Links if present
for i, link := range c.Links {
Expand Down

0 comments on commit a81341a

Please sign in to comment.