From d87507918f33b289ac4fc4dece8a54fa3aa34923 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 4 Aug 2024 17:24:36 +0900 Subject: feat(backend): add /logout to /admin/dashboard --- backend/main.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'backend/main.go') diff --git a/backend/main.go b/backend/main.go index 7330109..2d38ee5 100644 --- a/backend/main.go +++ b/backend/main.go @@ -83,6 +83,13 @@ 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. + e.POST("/logout", func(c echo.Context) error { + return c.Redirect(http.StatusPermanentRedirect, "http://localhost:5173/logout") + }) + gameHubs.Run() if err := e.Start(":80"); err != http.ErrServerClosed { -- cgit v1.2.3-70-g09d2