From 6645a60b3021c7cf767c6ba944e999445e22191a Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 27 Oct 2024 00:46:54 +0800 Subject: [PATCH] :bug: Bug fixes --- pkg/internal/http/api/forward.go | 9 --------- settings.toml | 3 --- 2 files changed, 12 deletions(-) diff --git a/pkg/internal/http/api/forward.go b/pkg/internal/http/api/forward.go index a3ddf02..03693aa 100644 --- a/pkg/internal/http/api/forward.go +++ b/pkg/internal/http/api/forward.go @@ -5,7 +5,6 @@ import ( "git.solsynth.dev/hypernet/nexus/pkg/internal/directory" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/proxy" - "github.com/rs/zerolog/log" "github.com/spf13/viper" "strings" ) @@ -25,7 +24,6 @@ func forwardService(c *fiber.Ctx) error { return fiber.NewError(fiber.StatusNotFound, "service not found") } - ogUrl := c.Request().URI().String() url := c.OriginalURL() url = strings.Replace(url, "/cgi/"+ogKeyword, "", 1) url = *service.HttpAddr + url @@ -36,13 +34,6 @@ func forwardService(c *fiber.Ctx) error { c.Set(fiber.HeaderAuthorization, "") } - log.Debug(). - Str("from", ogUrl). - Str("to", url). - Str("service", serviceType). - Str("id", service.ID). - Msg("Forwarding request for service...") - return proxy.Do(c, url) } diff --git a/settings.toml b/settings.toml index d1974f4..54c557e 100644 --- a/settings.toml +++ b/settings.toml @@ -6,9 +6,6 @@ domain = "localhost" database = false print_routes = false -[services] -aliases = { id = "auth", uc = "files", co = "interactive", im = "messaging" } - [database] dsn = "host=localhost user=postgres dbname=postgres password=password port=5432 sslmode=disable" prefix = "sn_"