我的网站在所有浏览器中均显示为安全。但是,当尝试从Facebook Messenger浏览器使用Facebook登录名登录时(从Messenger应用程序内部单击www.jobdirecto.com),出现错误,提示 Facebook检测到jobdirecto没有使用安全连接。 。
更奇怪的是,我可以在此错误消息的页面中看到安全符号。
如果我运行 heroku certs:auto ,这就是我得到的
Domain Status Reason Last Updated
────────────────── ─────────── ──────────────────────────────── ──────────────
jobdirecto.com Failed DNS redirect not forwarding path about 2 months
www.jobdirecto.com Cert issued about 2 months
(我不认为失败状态是问题所在,因为在同时使用jobdirecto.com或www.jobdirecto.com时都会出现该错误)
在我的index.js快递路线中,我有这个
app.get("*", function(req, res) {
res.redirect("https://" + req.headers.host + req.url);});
我的app.js中也有这个
if(location.protocol == "http" && window.location.hostname != "localhost"){
location.href = location.href.replace("http://","https://");}
发生了什么事?