aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvulonkaaz <7442677+vulonkaaz@users.noreply.github.com>2024-07-09 22:13:40 +0200
committervulonkaaz <7442677+vulonkaaz@users.noreply.github.com>2024-07-09 22:13:40 +0200
commit8d0a045ea5f42808c2b50d3b6b249862e04e2e9b (patch)
treeccf6e8be4905ff96aa1db8f3745bdf125f450646
parentce0a2b123603edcde4e17eacc02bafeec85f74ab (diff)
ip address behind nginx
-rw-r--r--controllers/post.go3
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{