[英]Reason: CORS header ‘Access-Control-Allow-Origin’ missing
I'm getting Cross-Origin Request Blocked:我的跨域请求被阻止:
The Same Origin Policy disallows reading the remote resource at http://localhost:8092/authenticate.
同源策略不允许读取位于 http://localhost:8092/authenticate 的远程资源。 (Reason: CORS header 'Access-Control-Allow-Origin' missing).
(原因:缺少 CORS header 'Access-Control-Allow-Origin')。
This error occurs while executing an Angular 8 project when I click the login button.当我单击登录按钮时执行 Angular 8 项目时发生此错误。
You need to add the Access-Control-Allow-Origin: *
header to the server endpoint (Note: this allows access from anywhere if used in production)您需要将
Access-Control-Allow-Origin: *
header 添加到服务器端点(注意:如果在生产中使用,这允许从任何地方访问)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.