我在节点版本v8.9.4中面临CORS问题。错误是-
Response to preflight request doesn't pass access control check: No
'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://localhost:4200' is therefore not allowed
access.在前端,我使用angular4,并将代码放在头中,但仍然面临问题。
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE,
OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-
Token');发布于 2018-02-09 10:20:13
不幸的是,这是Chrome /问题:https://bugs.chromium.org/p/chromium/issues/detail?id=67743
你必须要么
https://stackoverflow.com/questions/48703115
复制相似问题