Update
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user