config changed for ws address

main
jiyoungcheon 4 weeks ago
parent 044ad18c17
commit 5d78c215d2

@ -16,14 +16,9 @@ type AppInfo struct {
} }
type Urls struct { type Urls struct {
FailedDataListUrl string `xml:"FailedDataListUrl"` FailedDataListUrl string `xml:"FailedDataListUrl"`
NockChiServer NockChiServer `xml:"NockChiServer"` NockChiServerUrl string `xml:"NockChiServerUrl"`
TAUrl string `xml:"TAUrl"` TAUrl string `xml:"TAUrl"`
}
type NockChiServer struct {
Port string `xml:"port,attr"`
SrcIP string `xml:"srcIP,attr"`
} }
type Speech struct { type Speech struct {

@ -234,11 +234,9 @@ func PostReqForEachVoiceFile(reqDataForVoiceFile FailedDataListReqBody) (respons
func SendSTTResToNockChiServer(parsedRes FailedDataListReqBody, sttRes string, dir string) *icserror.IcsError { func SendSTTResToNockChiServer(parsedRes FailedDataListReqBody, sttRes string, dir string) *icserror.IcsError {
url := conf.Urls.NockChiServer.SrcIP url := conf.Urls.NockChiServerUrl
headers := http.Header{
"Origin": {"https://192.168.0.69"}, conn, _, err := websocket.DefaultDialer.Dial(url, nil)
}
conn, _, err := websocket.DefaultDialer.Dial(url, headers)
if err != nil { if err != nil {
l.Println("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err) l.Println("[ERR] client.go>SendSTTResToNockChiServer()> connecting websocket failed. err: %v", err)
return icserror.ICSERRWEBSOCKETConnectFailError return icserror.ICSERRWEBSOCKETConnectFailError

Loading…
Cancel
Save