From ae4397250e59e0e5bc1c3d01f6d5eb04396bf559 Mon Sep 17 00:00:00 2001 From: Odyssey346 Date: Sat, 18 Feb 2023 10:24:36 +0100 Subject: [PATCH] try fixing ip issue Signed-off-by: Odyssey346 --- main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 73fab6b..f61250b 100644 --- a/main.go +++ b/main.go @@ -1,14 +1,20 @@ package main import ( + "os" + "github.com/ProjectSegfault/publapi/pages" "github.com/gofiber/fiber/v2" - "os" ) // publapi is a simple API for Project Segfault's public shared server (pubnix). func main() { - app := fiber.New() + app := fiber.New(fiber.Config{ + AppName: "publapi", + EnableTrustedProxyCheck: true, + TrustedProxies: []string{"0.0.0.0/0"}, + ProxyHeader: fiber.HeaderXForwardedFor, + }) app.Get("/", func(c *fiber.Ctx) error { return c.JSON(fiber.Map{