https load http report Mixed Content

When developing Android, I encountered an Https page loaded with http js and css, prompting a Mixed Content error, preventing the loading

solution:

Android below:

 

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {  
     webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);  
}

 

 

Solve through the web page: automatically upgrade the unsafe request of http to https, which requires HTTPS support in the background

 

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325335572&siteId=291194637