mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-03-31 06:24:00 -04:00
feat(server): serve root at /rooturl on top of /rooturl/
This commit is contained in:
@@ -43,6 +43,9 @@ func newHandler(ctx context.Context, rootURL string,
|
||||
router.Use(middleware.Logger)
|
||||
rootURL = strings.TrimSuffix(rootURL, "/")
|
||||
|
||||
if rootURL != "" {
|
||||
router.Get(rootURL, handlers.index)
|
||||
}
|
||||
router.Get(rootURL+"/", handlers.index)
|
||||
|
||||
router.Get(rootURL+"/update", handlers.update)
|
||||
|
||||
Reference in New Issue
Block a user