From 8d0a045ea5f42808c2b50d3b6b249862e04e2e9b Mon Sep 17 00:00:00 2001 From: vulonkaaz <7442677+vulonkaaz@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:13:40 +0200 Subject: ip address behind nginx --- controllers/post.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'controllers/post.go') diff --git a/controllers/post.go b/controllers/post.go index 4ec49c4..d6698e3 100644 --- a/controllers/post.go +++ b/controllers/post.go @@ -6,6 +6,7 @@ import ( "paperchan.club/themagicpipe" "database/sql" "github.com/gofiber/fiber/v2" + "strings" "strconv" ) @@ -30,7 +31,7 @@ func Publish(c *fiber.Ctx) error { thread.Int32 = int32(parsed) thread.Valid = true } - ip := c.IP() + ip := c.IP()+strings.Join(c.IPs()," ") fixedPic, err := themagicpipe.DataURLConverter(picture) if err != nil { return c.JSON(fiber.Map{ -- cgit v1.2.3