Skip to content

Commit f8b75b1

Browse files
committed
disable proxy feature in gin-gonic
to remove warning on start
1 parent 412c574 commit f8b75b1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/webserver.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ func main() {
6565

6666
router := gin.Default()
6767

68+
// disable proxy feature of gin
69+
router.SetTrustedProxies(nil)
70+
6871
// Ping-endpoint
6972
router.GET("/ping", func(c *gin.Context) {
7073
c.JSON(200, gin.H{

0 commit comments

Comments
 (0)