如何在 Chrome 中强制加载动态的、不安全的内容? [英] How to force loading dynamic, insecure content in Chrome?
问题描述
我在 https 中使用 Jira,我想用一些额外的 JS 做一些调整.我的 JS 托管在不安全的服务器上(没有可用的 https).
I'm using Jira in https and I have some adjustments I'd like to make with some extra JS. My JS is hosted on an insecure server (no https available).
当我通过将不安全的 JS 文件插入到 DOM 中(使用浏览器扩展)动态加载它时,Chrome 告诉我:
When I dynamically load the insecure JS file by inserting it into the DOM (using a browser extension), Chrome tells me:
[阻止] https://jiraserver/browse
的页面运行了来自 http://myserver/jira.js
的不安全内容.
[blocked] The page at
https://jiraserver/browse
ran insecure content fromhttp://myserver/jira.js
.
我可以看出这是非常安全的,但我不在乎.我想加载那个不安全的 JS 文件.如何让 Chrome 信任我并按照我说的做?
I can see how this is very secure and all, but I don't care. I want to load that insecure JS file. How can I tell Chrome to trust me and just do what I say?
我的插入方法(在扩展代码中):
My insertion method (in the extension code):
document.body.appendChild((function(s){s.src='http://myserver/jira.js';return s;})(document.createElement('script')));
推荐答案
根据 此 Chrome 支持问答您可以使用以下命令行标志启动 Chrome,以防止 Chrome 检查不安全的内容:
According to this Chrome Support Q&A you can launch your Chrome with the following command line flag to prevent Chrome from checking for insecure content:
--allow-running-insecure-content
这是关于如何使用命令标志运行 Chrome 的一些文档
Here is some documentation on how to run Chrome with command flags
这篇关于如何在 Chrome 中强制加载动态的、不安全的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!