有人知道我可以在哪里托管laravel(php)+ mysql应用程序和js(react)应用程序吗?从后端端点获取数据时遇到一些麻烦。我在github页面和heroku上获得了ReactApp。我的后端服务器在另一台主机上。当我尝试使用提取API提取内容时:
fetch("https://pw-inz.cba.pl/inz_be/public/api/articles", {method: 'GET'}).then(response => { return response.json(); }).then(data => { return data; }).catch(err => { throw new Error(err); });
我遇到一个错误:
The page at 'https://rmdv2.herokuapp.com/' was loaded over HTTPS, but requested an insecure resource 'http://pw-inz.cba.pl/inz_be/public/api/articles'. This request has been blocked; the content must be served over HTTPS.
我认为..好吧..似乎很容易修复,将http更改为https,然后:
net::ERR_CERT_COMMON_NAME_INVALID
怎么了?我应该如何托管后端以使其与前端应用程序一起工作?