Firebase “如何修复”;混合内容:;从react调用elasticsearch时出错
我正在使用firebase的bitnami版本的elasticsearch。当我尝试使用postman时,我发现它只连接到Firebase “如何修复”;混合内容:;从react调用elasticsearch时出错,firebase,elasticsearch,axios,create-react-app,mixed-content,Firebase,elasticsearch,Axios,Create React App,Mixed Content,我正在使用firebase的bitnami版本的elasticsearch。当我尝试使用postman时,我发现它只连接到http,而不连接到https。我的create-react-app已部署到firebase,当我尝试使用axios库获取数据时,出现了混合内容:错误 这里是我的代码: import axios from 'axios'; axios.get('http://xx.xxx.xx.xxx//elasticsearch/tasks/task/_search?default_op
http
,而不连接到https
。我的create-react-app
已部署到firebase,当我尝试使用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.