-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: avoid a stuck when piwik.js return 401 status #15
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最近换了服务器,可能全球解析更新之前老 ip 就被回收使用了,回 401 的根本就不是我们的后端,等老解析过期就行。TLS 已上 TODO,再有这种奇葩问题也应该 silent fail。
另外统计本来就不是很重要,所以一直拖着还没在新服务器上部署,如果再拖下去估计可以直接去掉统计
对这个PR的处理的话,我建议 /closeme
html5up.net | @ajlkn | ||
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) | ||
--> | ||
<html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken diff, CLRF
@@ -27,7 +27,7 @@ | |||
_paq.push(['setTrackerUrl', u+'piwik.php']); | |||
_paq.push(['setSiteId', '1']); | |||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | |||
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); | |||
g.type='text/javascript'; g.async=true; g.defer=true; g.src='https://cdn.bootcss.com/piwik/3.5.0-rc1/piwik.js'; s.parentNode.insertBefore(g,s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
matomo 3.5.0 is released recently, we won't want to change the href everytime there is an update...
@neoFelhz could you retry this to see whether this problem persists? |
问题:
加载网页时跳转 http://t.ghosts.work/piwik/piwik.js 弹出 401 对话框请求登陆
复现方法:
在不屏蔽任何 Analytics Track 域名和 URL 的情况下打开 amazingapps.org
原因:
错误配置的 Piwik 使 Piwik.js 返回 401,Chrome 会跟随完成认证以完成页面加载
解决方案:
piwik.js 引用公共 CDN 库加载
仍然可能存在的问题:
Piwik 服务端 401 设置不当使 piwik.php 无法正常加载,仍然返回 401 并跳转验证