Android Play商店市场://链接不再有效? [英] Android Play Store market:// link is no longer working?
问题描述
过去一年中,我从我的网域重定向了我的用户:
$ b
到:market:// details?id = com.example.myapp
今天我从Chrome浏览器应用程序检查了Nexus 5 / LG G3 / OnePlus One,它停止工作!
现在,当我的用户尝试下载应用程序时,他们被重定向到了一个断开的链接。
任何人都知道Android中Chrome应用程序发生这种变化的一切吗?从阅读chrome的版本40发布版本,有一些洞察id喜欢分享
http://blog.chromium.org/2014/12/chrome-40- beta-powerful-offline-and.html
他们更新到内容安全策略2级,对重定向有更强的控制。
https:// w3c。 github.io/webappsec/specs/content-security-policy/#changes-from-level-1
- b $ b
如果加载的资源是重定向的结果,则源表达式的路径组件现在将被忽略,如第4.2.2.3节路径和重定向中所述。
默认情况下,重定向被阻止,并明确允许使用新的不安全重定向表达式。
所以我做了一些测试。如果您的初始操作是从重定向开始的(无论是window.location还是http 302),它都会显示错误。但是,一旦我创建了一个超链接到市场://并明确地点击它,它工作得很好。
现在我最终创建了一个介于两者之间的网页,用户点击链接继续。
I've been redirecting my users for the past year from my domain:
to: market://details?id=com.example.myapp
Today I've check this on Nexus 5/LG G3/OnePlus One from the chrome browser app and it stopped working!
Now, when my users try to download the app they are redirected to a broken link.
Anyone know anything about this change in the Chrome app in Android?
解决方案from reading the chrome's version 40 release, there are some insight i d like to share http://blog.chromium.org/2014/12/chrome-40-beta-powerful-offline-and.html
they updated to Content Security Policy Level 2, which has a stronger control over redirects. https://w3c.github.io/webappsec/specs/content-security-policy/#changes-from-level-1
The path component of a source expression is now ignored if the resource being loaded is the result of a redirect, as described in §4.2.2.3 Paths and Redirects.
Redirects are blocked by default, and explicitly allowed with a new unsafe-redirect expression.
So I did some testing. if your initial action started from redirect (no matter window.location or http 302) it will show an error. but once i created a hyperlink to market:// and explicitly clicked it, it worked fine.
for now i ended up creating a webpage in between, where i ask the user to click the link to proceed.
这篇关于Android Play商店市场://链接不再有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!