假设我有随机ElasticSearch域端点https://defghijklm.eu-west-1.es.amazonaws.com
尝试在本地查询或获取数据可以正常工作,但一旦部署,我的cloudwatch日志就会出错:
"errorType": "TypeError",
"errorMessage": "Invalid URL: abcdefghijklm.eu-west-1.es.amazonaws.com",
"code": "ERR_INVALID_URL",
似乎该协议被忽略了,所以我尝试在本地复制它,如果我这样做,就会出现确切的错误:
const url = https://abcdefgh.eu-west-1.es.amazonaws.com
console.log(url.substr(8))
还尝试在url末尾添加“/”,子字符串将跳转8个附加字符:(p.ex)
URL: https://abcdefghijklm.eu-west-1.es.amazonaws.com/
"errorType": "TypeError",
"errorMessage": "Invalid URL: jklm.eu-west-1.es.amazonaws.com",
"code": "ERR_INVALID_URL",
注意:这只发生在dev/prod阶段,而不是本地
暂无答案!
目前还没有任何答案,快来回答吧!