如何将凭据传递给 UIWebView?
我遇到一个问题,我在 Web 视图(本地存储)中显示一些 HTML,并且它从安全服务器提取图像。通常,为了在桌面浏览器甚至内置 Safari 浏览器中查看该图像本身,我会收到输入用户名/密码的提示。
例如,假设我有以下 HTML:
<img src="http://mysecureserver.example.com/image.png">
如果我在浏览器中导航到 http://mysecureserver.example.com/image.png
,系统会提示我输入用户名/密码。
但是,当我在 UIWebView
中显示完整的 HTML 时,其余的 HTML 会正确呈现,但该图像不会显示,也不会引发任何错误。
因此,我只是想知道是否可以将我的用户名/密码传递到 Web 视图,以便容器经过身份验证,并且理论上现在能够查看图像。
有什么想法吗?
先感谢您!!!
另请注意:
iPad 已设置为使用 VPN。即使在 VPN 上设置了 iPad,也不会显示图像。
I have an issue where I am displaying some HTML in a Web View (locally stored) and it is pulling images from a secure server. Normally, in order to view that image by itself in a desktop browser, or even the built in Safari Browser, I get prompted for my Username / Password.
For example, say I have the following HTML:
<img src="http://mysecureserver.example.com/image.png">
If I navigate to http://mysecureserver.example.com/image.png
in a browser, I get prompted for my username / password.
However, when I display the full HTML in a UIWebView
, the rest of the HTML renders properly, but that image does not show up and no errors are thrown.
Therefore, I would simply like to know if I can pass my Username/Password to the Web View so that the container is authenticated and, in theory, now be able to view the image.
Any ideas??
Thank you in advance!!!
also, please note that:
The iPad is already set up to be on a VPN. Even with the iPad set up on the VPN no image is being displayed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过以下操作:http://www.cs.rutgers.edu /~watrous/user-pass-url.html?
Did you try this: http://www.cs.rutgers.edu/~watrous/user-pass-url.html?