如何在 Chrome 开发工具的控制台中禁用以下警告?
[Deprecation] The website requested a subresource from a network that it could only access because of its users' privileged network position. These requests expose non-public devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage. To mitigate these risks, Chrome deprecates requests to non-public subresources when initiated from non-secure contexts, and will start blocking them in Chrome 92 (July 2021). See https://chromestatus.com/feature/5436853517811712 for more details.
最佳答案
我使用的是 Vue CLI,当应用程序启动时,终端中打印以下内容:
App running at:
- Local: http://localhost:8080/
- Network: http://192.168.100.100:8080/
我当时使用Network
并收到警告,更改为使用Local
URL 为我消除了警告。
关于vue.js - 弃用 - 网站从网络请求子资源,但由于其用户的特权网络位置而只能访问该子资源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67580495/