Openshift web控制台-运行扩展脚本不会';行不通

Openshift web控制台-运行扩展脚本不会';行不通,openshift,openshift-web-console,Openshift,Openshift Web Console,我正在通读,它告诉我要做以下事情,我已经做了: oc edit configmap/webconsole-config -n openshift-web-console // I put in the below (obviously with a correct URL): scriptURLs: - https://url-for-a-js-file // And also tried it with the below: scriptURLs:['https:/

我正在通读,它告诉我要做以下事情,我已经做了:

oc edit configmap/webconsole-config -n openshift-web-console

// I put in the below (obviously with a correct URL):
  scriptURLs:
    - https://url-for-a-js-file

// And also tried it with the below:
      scriptURLs:['https://url-for-a-js-file']
上面的JS文件如下所示:

(function() {
console.log('---testing a script!---');
}());
然而,这两种方法都不起作用。控制台从不显示记录的语句


我知道文档中说“脚本和样式表必须使用正确的内容类型提供,否则它们将不会由浏览器运行。脚本必须使用内容类型:application/javascript和内容类型:text/css的样式表提供。”但如果我只是从HTTPS服务器链接文件,我不确定如何“提供”这样的文件(在本例中为gitlab URL)。

看起来您指向了脚本的外部github或gitlab URL。您必须将该文件托管在其他地方