Try to fix rate limits when reverse-proxied.

Signed-off-by: Odyssey <odyssey346@disroot.org>
このコミットが含まれているのは:
Odyssey 2022-11-29 21:53:25 +01:00
コミット 1e382e3cfd
1個のファイルの変更4行の追加0行の削除

ファイルの表示

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