iOS 10 "Starting WebFilter logging for process" + Proxy-Authorization header 从请求中删除

iOS 10 "Starting WebFilter logging for process" + Proxy-Authorization header removed from request

从 iOS 10 开始,我在我的应用程序中发现了这样的日志

yyyy-MM-dd HH:mm:sss HelloWorld[XXX:XXXXXX] WF: === Starting WebFilter logging for process HelloWorld
yyyy-MM-dd HH:mm:sss HelloWorld[XXX:XXXXXX] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
yyyy-MM-dd HH:mm:sss HelloWorld[XXX:XXXXXX] WF: _WebFilterIsActive returning: NO

我已查看 iOS 10 Release notes 但没有关于 WebFilter 功能的信息

我还注意到,对于某些站点,Proxy-Authorization 从请求中删除(我使用以编程方式配置的代理),这个问题从 iOS 10.

开始

有人可以解释一下吗?

更新 1

发生这种情况时我找到了稳定的案例

  1. 某些站点 example.org 的 WebView 请求 / 超过 https
  2. 收到 html 包含 http link 某些资源(css 的图像),例如 http://example.org/icon.png
  3. 这导致 Header 移除

使用 Chrome 开发人员工具检查站点,您很可能会发现类似 Mixed Content: The page at '...' as loaded over HTTPS, but requested an insecure resource '...'. This content should also be served over HTTPS.

的警告

根据 Apple 的说法,Safari 10 中的 "Content Security Policy (CSP) support" "has been enhanced by including version 2.0 of the standard." 似乎这也包括 iOS 10。

在这里查看 CSP 级别:https://content-security-policy.com

我遇到了同样的问题,我的原因是,我曾尝试在 iframe.When 中打开扩展名为 .webm 的视频 我将视频扩展名从 .webm 更改为 .mov 或 .mp4问题已解决。

如果您想删除 XCode 控制台上的消息,请按照以下步骤操作。

Select Product => Scheme => Edit Scheme or use shortcut : CMD + <
Select the Run option from left side.
On Environment Variables section, add the variable OS_ACTIVITY_MODE = disable

我收到了相同的消息,链接到没有从 AdMob 提供的奖励视频。
我安装了最新的 AdMob 框架 - 仍然是同样的错误。
仔细检查我是否正确设置了与 AdMob 集成相关的所有设置,然后等待。
一天后,所有视频都按预期交付,所以我认为这是 Google 端的问题。