我正在使用 firebase 的 elasticsearch 的 bitnami 版本。我发现它只能连接到http
并不是https
当我使用邮递员尝试时。我的create-react-app
已部署到 firebase,我得到Mixed Content:
当我尝试使用获取数据时出错axios
图书馆。
这是我的代码:
import axios from 'axios';
axios.get('http://xx.xxx.xx.xxx//elasticsearch/tasks/task/_search?default_operator=AND&q=*', {
httpsAgent: agent,
method: 'get',
headers: {
// 'Content-Type': 'application/json',
'Authorization': 'Basic xxxxxxxxxx='
}
});
和错误
Mixed Content: The page at 'https://xxx-xxxx.firebaseapp.com/tasks' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://xx.xxx.xx.xxx//elasticsearch/tasks/task/_search?default_operator=AND&q=*'. This content should also be served over HTTPS.
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)