This commit is contained in:
PB
2024-12-05 16:59:08 +01:00
parent 13073daa38
commit ac19e766cf
10 changed files with 18 additions and 15 deletions

View File

@@ -21,7 +21,7 @@ const (
defNetAddr = ":443"
defMongoDbURL = "mongodb://mongodb:12345678@mongo-db:27017"
defPathPrefix = "/identity"
defRegistryAddr = "api-registry:8500"
defRegistryAddr = "api-registry:8501"
defEbEventsExchange = "api-events"
defEbEventsQueue = "identity-svc"
)

View File

@@ -1,8 +1,6 @@
package server
import (
"strings"
"github.com/gofiber/fiber/v2"
"git.pbiernat.io/egommerce/go-api-pkg/fluentd"
@@ -18,10 +16,10 @@ func SetupMiddleware(s *Server) {
func LoggingMiddleware(log *fluentd.Logger) func(c *fiber.Ctx) error {
return func(c *fiber.Ctx) error {
path := string(c.Request().URI().Path())
if strings.Contains(path, "/health") {
return c.Next()
}
// path := string(c.Request().URI().Path())
// if strings.Contains(path, "/health") {
// return c.Next()
// }
log.Log("Request: %s, remote: %s, via: %s",
c.Request().URI().String(),

View File

@@ -68,7 +68,7 @@ func (s *Server) RegisterHandler(name string, fn func() any) {
func (s *Server) OnShutdown() {
// s.GetLogger().Log("Server %s is going down...", s.ID)
s.GetRegistry().Unregister()
// s.GetRegistry().Unregister()
// a.clearMetadataCache()
// s.GetEventBus().Close()
s.GetDatabase().Close()