fix baseurl in links
Some checks failed
/ build-container (push) Has been cancelled

This commit is contained in:
Finn 2024-11-23 01:50:46 -08:00
parent f1209d3b6b
commit 511897164e
3 changed files with 7 additions and 5 deletions

View file

@ -72,7 +72,8 @@ func lockEditHandler(c echo.Context) error {
return err
}
return c.Redirect(http.StatusFound, fmt.Sprintf("/locks/%d", lockID))
baseURL := c.Request().Header.Get("X-Ingress-Path")
return c.Redirect(http.StatusFound, fmt.Sprintf("%s/locks/%d", baseURL, lockID))
}
func lockCodeEditHandler(c echo.Context) error {
@ -162,5 +163,6 @@ func lockCodeEditHandler(c echo.Context) error {
return err
}
return c.Redirect(http.StatusFound, fmt.Sprintf("/locks/%d", lockID))
baseURL := c.Request().Header.Get("X-Ingress-Path")
return c.Redirect(http.StatusFound, fmt.Sprintf("%s/locks/%d", baseURL, lockID))
}