[英]How to handle “Response to preflight request doesn't pass No Access-control-Allow-Origin header is present on requested resource ” from angular in BE
I'm sending this request from Angular UI:我从 Angular UI 发送这个请求:
'Accept':'multipart/form-data',
'Access-Control-Allow-Crendentails':'true',
'Access-Control-Allow-Origin':'*',
'Access-Control-Allow-Method':'POST,GET,OPTIONS,PUT',
'Access-Control-Allow-Headers':'Authorization,Content-Type'
Iv'e got the following error:我有以下错误:
Orgin'http://localhost ' is therefore not allowed
The webserver is Apache Tomcat.网络服务器是 Apache Tomcat。 How can I handle this error?
我该如何处理这个错误?
Please go through the following two links to solve your problem:请go通过以下两个链接解决您的问题:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.