How to get Latest Chrome (Version 55) to allow mixed content?

拜拜、爱过 提交于 2019-12-21 17:39:37

问题


I have a chrome extension that communicates using HTTP in development and HTTPS in production.

I run it from webpages that use HTTPS.

When I use this extension in my development mode I get the following error.

Mixed Content: The page at 'https://somesite.com' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://david-sniper.local:3001/api/end-point'. This content should also be served over HTTPS.

In the past I have been able to resolve this error by going reading this post how-to-get-chrome-to-allow-mixed-content

There are two solutiions in this post.

  1. "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-running-insecure-content
  2. In the address bar at the right end should be a 'shield' icon, you can click on that to run insecure content.

I have never had success with the first solution, but the second solution where you click on the 'shield' icon was working up until a few weeks ago.

I'm now on Chrome 55 and there is NO Shield option to click on, so I'm wondering how to get mixed content working in developer mode?


回答1:


Following a tip by Zig Mandel, I used command line parameters to run Chrome without security.

I created a folder called c:\_chrome_data and I unpacked my developer extension into chrome extensions and I used this command line.

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --allow-running-insecure-content --disable-web-security --user-data-dir=C:\_chrome_data

Click the Shield, I noticed that the shield is not available in Version 55 of chrome anymore unless you have the settings listed in the command line included.

Working Extension



来源:https://stackoverflow.com/questions/41498423/how-to-get-latest-chrome-version-55-to-allow-mixed-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!