diff --git a/icsconf/icsconf.go b/icsconf/icsconf.go index 3af8900..193b71d 100644 --- a/icsconf/icsconf.go +++ b/icsconf/icsconf.go @@ -16,14 +16,9 @@ type AppInfo struct { } type Urls struct { - FailedDataListUrl string `xml:"FailedDataListUrl"` - NockChiServer NockChiServer `xml:"NockChiServer"` - TAUrl string `xml:"TAUrl"` -} - -type NockChiServer struct { - Port string `xml:"port,attr"` - SrcIP string `xml:"srcIP,attr"` + FailedDataListUrl string `xml:"FailedDataListUrl"` + NockChiServerUrl string `xml:"NockChiServerUrl"` + TAUrl string `xml:"TAUrl"` } type Speech struct { diff --git a/icshttp/client.go b/icshttp/client.go index aa214dd..2b48316 100644 --- a/icshttp/client.go +++ b/icshttp/client.go @@ -234,11 +234,9 @@ func PostReqForEachVoiceFile(reqDataForVoiceFile FailedDataListReqBody) (respons func SendSTTResToNockChiServer(parsedRes FailedDataListReqBody, sttRes string, dir string) *icserror.IcsError { - url := conf.Urls.NockChiServer.SrcIP - headers := http.Header{ - "Origin": {"https://192.168.0.69"}, - } - conn, _, err := websocket.DefaultDialer.Dial(url, headers) + url := conf.Urls.NockChiServerUrl + + conn, _, err := websocket.DefaultDialer.Dial(url, nil) if err != nil { l.Println("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err) return icserror.ICSERRWEBSOCKETConnectFailError