[#223] updated the internal redirects to allow easier subpath deployment when behind a reverse proxy
This commit is contained in:
parent
4778fc7a46
commit
578e1c9bc1
|
@ -51,6 +51,8 @@
|
||||||
|
|
||||||
- **!** Removed the previously deprecated `Dao.Block()` and `Dao.Continue()` helpers in favor of `Dao.NonconcurrentDB()`.
|
- **!** Removed the previously deprecated `Dao.Block()` and `Dao.Continue()` helpers in favor of `Dao.NonconcurrentDB()`.
|
||||||
|
|
||||||
|
- Updated the internal redirects to allow easier subpath deployment when behind a reverse proxy.
|
||||||
|
|
||||||
- Other minor Admin UI improvements.
|
- Other minor Admin UI improvements.
|
||||||
|
|
||||||
## v0.12.3
|
## v0.12.3
|
||||||
|
|
|
@ -163,7 +163,7 @@ func bindStaticAdminUI(app core.App, e *echo.Echo) error {
|
||||||
e.GET(
|
e.GET(
|
||||||
strings.TrimRight(trailedAdminPath, "/"),
|
strings.TrimRight(trailedAdminPath, "/"),
|
||||||
func(c echo.Context) error {
|
func(c echo.Context) error {
|
||||||
return c.Redirect(http.StatusTemporaryRedirect, trailedAdminPath)
|
return c.Redirect(http.StatusTemporaryRedirect, strings.TrimLeft(trailedAdminPath, "/"))
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -224,12 +224,12 @@ func installerRedirect(app core.App) echo.MiddlewareFunc {
|
||||||
|
|
||||||
if totalAdmins == 0 && !hasInstallerParam {
|
if totalAdmins == 0 && !hasInstallerParam {
|
||||||
// redirect to the installer page
|
// redirect to the installer page
|
||||||
return c.Redirect(http.StatusTemporaryRedirect, trailedAdminPath+"?installer#")
|
return c.Redirect(http.StatusTemporaryRedirect, "?installer#")
|
||||||
}
|
}
|
||||||
|
|
||||||
if totalAdmins != 0 && hasInstallerParam {
|
if totalAdmins != 0 && hasInstallerParam {
|
||||||
// redirect to the home page
|
// clear the installer param
|
||||||
return c.Redirect(http.StatusTemporaryRedirect, trailedAdminPath+"#/")
|
return c.Redirect(http.StatusTemporaryRedirect, "?")
|
||||||
}
|
}
|
||||||
|
|
||||||
return next(c)
|
return next(c)
|
||||||
|
|
Loading…
Reference in New Issue