为什么vue组件访问不了外部http 的api #354
Answered
by
mingruankeji
mingruankeji
asked this question in
Q&A
-
用npm create @quick-start/electron创建的vue项目.为什么vue组件访问不了外部http 的api.主进程访问可以,渲染进程访问就报错:Home.vue:58 Refused to connect to 'http://127.0.0.1:22111/api/SampleData/Sgettbzhjl' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback. |
Beta Was this translation helpful? Give feedback.
Answered by
mingruankeji
Dec 17, 2023
Replies: 1 comment 1 reply
-
我自己找到原因了,感谢,结贴. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mingruankeji
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我自己找到原因了,感谢,结贴.