🐛 Bug fixes

This commit is contained in:
LittleSheep 2024-10-27 00:46:54 +08:00
parent d588b0723b
commit 6645a60b30
2 changed files with 0 additions and 12 deletions

View File

@ -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)
}

View File

@ -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_"