try fixing ip issue

Signed-off-by: Odyssey346 <odyssey346@disroot.org>
This commit is contained in:
Odyssey346 2023-02-18 10:24:36 +01:00
parent 35c45a8126
commit ae4397250e

10
main.go
View File

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