Skip to content

Conversation

@neoFelhz
Copy link

@neoFelhz neoFelhz commented May 9, 2018

问题:

加载网页时跳转 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 并跳转验证

@Riajyuu Riajyuu requested review from gloomy-ghost and venmos May 9, 2018 14:12
@Riajyuu Riajyuu added the bug label May 9, 2018
Copy link
Contributor

@gloomy-ghost gloomy-ghost left a 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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

broken diff, CLRF

_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);
Copy link
Contributor

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...

@Riajyuu
Copy link
Contributor

Riajyuu commented May 11, 2018

@neoFelhz could you retry this to see whether this problem persists?
Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants