fix: avoid a stuck when piwik.js return 401 status #15
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 并跳转验证