From 5d78c215d2d64a17bd3cc35de9a4afb20406e22d Mon Sep 17 00:00:00 2001 From: jiyoungcheon Date: Thu, 28 Nov 2024 19:43:40 -0500 Subject: [PATCH] config changed for ws address --- icsconf/icsconf.go | 11 +++-------- icshttp/client.go | 8 +++----- 2 files changed, 6 insertions(+), 13 deletions(-) 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