diff options
author | vulonkaaz <7442677+vulonkaaz@users.noreply.github.com> | 2024-07-09 22:13:40 +0200 |
---|---|---|
committer | vulonkaaz <7442677+vulonkaaz@users.noreply.github.com> | 2024-07-09 22:13:40 +0200 |
commit | 8d0a045ea5f42808c2b50d3b6b249862e04e2e9b (patch) | |
tree | ccf6e8be4905ff96aa1db8f3745bdf125f450646 | |
parent | ce0a2b123603edcde4e17eacc02bafeec85f74ab (diff) |
ip address behind nginx
-rw-r--r-- | controllers/post.go | 3 |
1 files changed, 2 insertions, 1 deletions
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{ |