Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit db13181

Browse files
committedMay 18, 2018
Return the host of the call with info
1 parent 934b502 commit db13181

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎info.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
func infoHandler(c *gin.Context) {
99
c.JSON(200, gin.H{
1010
"version": version,
11-
"http": "http://localhost" + port,
12-
"https": "https://localhost" + portSSL,
13-
"ws": "ws://localhost" + port,
14-
"wss": "wss://localhost" + portSSL,
11+
"http": "http://" + c.Request.Host + ":" + port,
12+
"https": "https://" + c.Request.Host + ":" + portSSL,
13+
"ws": "ws://" + c.Request.Host + ":" + port,
14+
"wss": "wss://" + c.Request.Host + ":" + portSSL,
1515
})
1616
}
1717

0 commit comments

Comments
 (0)
Please sign in to comment.