javascript - Parcel Bundler 给出内容安全策略错误
问题描述
每次我捆绑(包裹)我的项目时,我总是收到一条错误消息...
Refused to connect to 'ws://localhost:#####/' because it violates the following Content Security Policy
这迫使我每次都更新元标记中的 connect-src 属性以使其正常工作。但是,每次我执行新的 npm run start 时,我是否可以避免这种情况发生?或者这就是它应该的样子?
解决方案
推荐阅读
- google-apps-script - Oauth 2 属性提供了无效值:Header:toType
- javascript - 如何找到服务区业务的 google place ID?
- java - 将静态方法从 java 转换为 kotlin 时出现问题
- android - android wear 以编程方式调出 app laucher
- javascript - 单击块时如何不计算子块(例如.child span)?
- javascript - 如何为引导卡创建这些动画?这对我来说非常复杂,因为我是新手
- python - 多输出 Keras 模型中的消失维度
- react-native - 使用 react-navigation 在 Drawer Navigator 中为路线设置参数
- python - Python 仅当时间是 5 时
- android - 如何检测哪个运营商(Sim1 或 Sim2)在设备中提供移动数据?