package ipcast import ( "github.com/gin-gonic/gin" "lcfns/gatewayServer" "lcfns/service" "strings" ) type ApiGroup struct { IpcastApi } var ( ipcastService = service.ServiceGroupApp.IpcastServiceGroup.IpcastService ) func IpcastBaseUrl(c *gin.Context) string { header := c.GetHeader("isn") conn, ok := gatewayServer.ConnMap[header] if !ok { return "" } return "http://" + strings.Split(conn.RemoteAddr().String(), ":")[0] + ":8849" }