mirror of
https://github.com/ProjectSegfault/publapi.git
synced 2024-09-08 04:45:33 +05:30
try fixing ip issue
Signed-off-by: Odyssey346 <odyssey346@disroot.org>
This commit is contained in:
parent
35c45a8126
commit
ae4397250e
10
main.go
10
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{
|
||||
|
Loading…
Reference in New Issue
Block a user