【发布时间】:2018-05-24 19:37:51
【问题描述】:
我需要从 angular5 的 elastisearch.js 客户端调用没有端口号的弹性搜索 url
我需要像这样调用没有端口的 elasticsearch url
'https://myelasticsearch-api.xyz.com/api1/1.0'
但它总是像这样附加默认端口
'https://myelasticsearch-api.xyz.com:9200/api1/1.0'
private connect() {
this.client = new Client({
host: {
host: 'myelasticsearch-api.xyz.com',
port: '',
protocol:'https',
headers: {
'authorization': 'Bearer ' + this.accessTolken,
},
path:'/api1/1.0'
},
log: 'warning'
});
}
【问题讨论】: