From 0f0324b396f3eab53606c8f770d26337dd0e291a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 4 Aug 2024 20:33:37 +0900 Subject: feat: authenticate users in admin pages --- backend/main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'backend/main.go') diff --git a/backend/main.go b/backend/main.go index 2d38ee5..e2e4bbd 100644 --- a/backend/main.go +++ b/backend/main.go @@ -83,9 +83,11 @@ func main() { adminGroup := e.Group("/admin") adminHandler.RegisterHandlers(adminGroup) - // For local dev: - // This is never used in production because the reverse proxy sends /logout - // to the app server. + // For local dev: This is never used in production because the reverse + // proxy sends /login and /logout to the app server. + e.GET("/login", func(c echo.Context) error { + return c.Redirect(http.StatusPermanentRedirect, "http://localhost:5173/login") + }) e.POST("/logout", func(c echo.Context) error { return c.Redirect(http.StatusPermanentRedirect, "http://localhost:5173/logout") }) -- cgit v1.2.3-70-g09d2