我的问题并不适合单行主题。如果有人键入的脚本名称不在我的 package.json 中,我想覆盖打印“缺少脚本”,而是打印一个文本文件,其中列出了我的scripts节点中的命令及其用途。
有没有办法做到这一点?
我已将Google字体URL添加到Content-Security-Policy标头的font-src指令中.我在Chrome 42中遇到以下错误:
Refused to load the stylesheet 'http://fonts.googleapis.com/css?
family=Open+Sans:300,400,400italic,600,800|Source+Code+Pro' because it violates the
following Content Security Policy directive: "style-src 'self' 'unsafe-inline'".
Run Code Online (Sandbox Code Playgroud)
我的标题字段如下所示:
Content-Security-Policy: default-src 'self'; font-src http://fonts.googleapis.com;
style-src 'self' 'unsafe-inline'
Run Code Online (Sandbox Code Playgroud)