From 1e382e3cfd87cb760c660345dc9867fde7713fa7 Mon Sep 17 00:00:00 2001 From: Odyssey Date: Tue, 29 Nov 2022 21:53:25 +0100 Subject: [PATCH] Try to fix rate limits when reverse-proxied. Signed-off-by: Odyssey --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 499525f..78642b9 100644 --- a/main.go +++ b/main.go @@ -38,6 +38,10 @@ func main() { Views: engine, Prefork: true, AppName: "GotHub", + // fucked up way to fix rate limits + EnableTrustedProxyCheck: true, + TrustedProxies: []string{"0.0.0.0/0"}, + ProxyHeader: fiber.HeaderXForwardedFor, ErrorHandler: func(ctx *fiber.Ctx, err error) error { code := fiber.StatusInternalServerError