fix: avoid a stuck when piwik.js return 401 status#15
Open
neoFelhz wants to merge 1 commit intoAmazingApps:masterfrom
neoFelhz:master
Open
fix: avoid a stuck when piwik.js return 401 status#15neoFelhz wants to merge 1 commit intoAmazingApps:masterfrom neoFelhz:master
neoFelhz wants to merge 1 commit intoAmazingApps:masterfrom
neoFelhz:master
Conversation
gloomy-ghost
reviewed
May 9, 2018
Contributor
gloomy-ghost
left a comment
There was a problem hiding this comment.
最近换了服务器,可能全球解析更新之前老 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> |
| _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); |
Contributor
There was a problem hiding this comment.
matomo 3.5.0 is released recently, we won't want to change the href everytime there is an update...
Contributor
|
@neoFelhz could you retry this to see whether this problem persists? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题:
加载网页时跳转 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 并跳转验证