【发布时间】:2015-12-31 04:31:13
【问题描述】:
我的一些 Python shell 脚本在 Apple OSX 10.11、El Capitan 下新出现了安全错误。似乎新的 App Transport Security 不喜欢脚本如何以纯文本形式调用 HTTP 资源,而不是使用 HTTPS。
Fetching http://blahblah.com
Python[5553:5648168] App Transport Security has blocked a cleartext HTTP (http://)
resource load since it is insecure. Temporary exceptions can be configured
via your app's Info.plist file.
我该如何解决这个问题?没有我可以调用的 HTTPS 资源,所以我坚持使用 HTTP。 Apple 的建议是在应用程序的 info.plist 文件中创建一个例外,但这是从 shell 脚本调用的 Python 脚本,因此没有要编辑的 info.plist 文件。
想法?根本问题似乎出在 Python 中的 webkit2png 上。其非 HTTPS 请求被 ATS 拦截,没有 info.plist 可修改。
【问题讨论】: