aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/main.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-04 17:24:36 +0900
committernsfisis <nsfisis@gmail.com>2024-08-04 17:24:36 +0900
commitd87507918f33b289ac4fc4dece8a54fa3aa34923 (patch)
treeac21e8263526daff40a0d5138c23a74a5b38ca0b /backend/main.go
parent2034d5efe124ffa8a9bb56821a9dfcfea27425ff (diff)
downloadiosdc-japan-2025-albatross-d87507918f33b289ac4fc4dece8a54fa3aa34923.tar.gz
iosdc-japan-2025-albatross-d87507918f33b289ac4fc4dece8a54fa3aa34923.tar.zst
iosdc-japan-2025-albatross-d87507918f33b289ac4fc4dece8a54fa3aa34923.zip
feat(backend): add /logout to /admin/dashboard
Diffstat (limited to 'backend/main.go')
-rw-r--r--backend/main.go7
1 files changed, 7 insertions, 0 deletions
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 {