ip handler
This commit is contained in:
parent
5dbfdd836a
commit
5dc3cfa8b3
7
app/http/endpoints/root/IpHandler.go
Normal file
7
app/http/endpoints/root/IpHandler.go
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
package root
|
||||||
|
|
||||||
|
import "github.com/gin-gonic/gin"
|
||||||
|
|
||||||
|
func IpHandler(ctx *gin.Context) {
|
||||||
|
ctx.String(200, ctx.ClientIP())
|
||||||
|
}
|
@ -51,6 +51,9 @@ func StartServer() {
|
|||||||
|
|
||||||
router.Use(middleware.Cors(config.Conf))
|
router.Use(middleware.Cors(config.Conf))
|
||||||
|
|
||||||
|
// util endpoints
|
||||||
|
router.GET("/ip", root.IpHandler)
|
||||||
|
|
||||||
router.GET("/webchat", root.WebChatWs)
|
router.GET("/webchat", root.WebChatWs)
|
||||||
|
|
||||||
router.POST("/callback", middleware.VerifyXTicketsHeader, root.CallbackHandler)
|
router.POST("/callback", middleware.VerifyXTicketsHeader, root.CallbackHandler)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user