123456789101112131415161718192021222324252627 |
- package ipcast
- import (
- "fmt"
- "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]
- fmt.Println("connmap:", gatewayServer.ConnMap)
- if !ok {
- return ""
- }
- return "http://" + strings.Split(conn.RemoteAddr().String(), ":")[0] + ":8849"
- }
|