Add auth protection sample and standardize json.

This commit is contained in:
2025-05-14 09:26:48 +08:00
parent bcb820ea9b
commit 418a30f062
6 changed files with 71 additions and 20 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ func RegisterRoutes(rg *gin.RouterGroup) {
rg.Use(middleware.Logger())
// Define routes
rg.GET("/health", handlers.HealthCheck)
rg.GET("/health", middleware.AuthRequired(), handlers.HealthCheck)
// Logto authentication routes
rg.GET("/auth/", handlers.HomeHandler)