【问题标题】:open https://xyz.com Basic Auth external website url in Android using PhoneGap View使用 PhoneGap View 在 Android 中打开 https://xyz.com Basic Auth 外部网站 url
【发布时间】:2012-12-07 03:07:42
【问题描述】:

我们如何在 phoneGap 视图中打开具有基本 Auth 的外部站点 URL?

super.loadUrl("https://google.com"); //it works
super.loadUrl("https://xyz.com"); //this site has Basic Auth, it's not working & it is not giving authentication challenge (popup for credentials)

我们如何传递凭据?目前我没有使用任何 phoneGap 功能,如果有任何其他方法可以继续,请告诉我。

【问题讨论】:

  • 你想做什么?无论如何,我怀疑使用 HTTP 身份验证是一个好的解决方案!

标签: android cordova https android-webview basic-authentication


【解决方案1】:

试试这个: 编辑“res”文件夹中的“config.xml”文件,并用以下几行代替那里的内容

<access origin="http://127.0.0.1*"/> 
<access origin="https://xyz.com" /> 
<access origin="https://xyz.com" subdomains="true" />
<access origin=".*"/>

【讨论】:

    猜你喜欢
    • 2015-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-06
    • 2013-03-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多