dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 809b481c770d55e55873a8786b9c267fbaa1ecb3
parent 128f7fa2159172f69c54d2b887a853f43badce28
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Wed, 18 Jan 2023 15:26:25 -0800

fix first use middleware

Diffstat:
Mpkg/web/middlewares/middlewares.go | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/web/middlewares/middlewares.go b/pkg/web/middlewares/middlewares.go @@ -457,7 +457,7 @@ func NoAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc { // FirstUseMiddleware if first use, redirect to / func FirstUseMiddleware(next echo.HandlerFunc) echo.HandlerFunc { return func(c echo.Context) error { - if config.IsFirstUse.IsTrue() { + if config.IsFirstUse.IsTrue() && c.Path() != "/" { return c.Redirect(http.StatusFound, "/") } return next(c)