如何在 Android WebView 中禁用内容安全策略?

How to disable Content Security Policy in Android WebView?

我正在尝试在 WebView 中加载 TikTok 网站。但我不能。在 logcat 我得到这个错误:

"[Report Only] Refused to load the script 'https://sf16-scmcdn-va.ibytedtos.com/goofy/slardar/fe/sdk/plugins/monitors.3.5.4.maliva.js' because it violates the following Content Security Policy directive: "script-src 'self' blob: data: 'unsafe-inline' 'unsafe-eval' polyfill.io *.kakao.com *.cdn-apple.com *.tiktokcdn.com *.byteoversea.com *.tiktok.com".
", source: https://www.tiktok.com/ (0)

Chromium 似乎阻止了一些 javascript 文件,这就是我出现白屏的原因。我该如何禁用或解决它?

我的网页视图:

    webView.getSettings().setJavaScriptEnabled(true);
    webView.setWebViewClient(new WebViewWebClient());
    webView.getSettings().setSaveFormData(false);
    webView.getSettings().setJavaScriptEnabled(true);
    webView.getSettings().setPluginState(WebSettings.PluginState.ON);
    webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
    webView.getSettings().setUserAgentString(System.getProperty("http.agent"));
    webView.loadUrl("https://www.tiktok.com/");
webView.getSettings().setDomStorageEnabled(true);

已修复。谢谢大家