好的,这就是我的胶水清单的样子。如您所见,正在设置 cors 对象,但是从前端应用程序运行时,我不断收到这个愚蠢的错误:localhost:3000。
Access to XMLHttpRequest at 'http://localhost:8082/api/v1/check_out_order' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
"glueManifest": {
"server": {
"port": 8082,
"routes": {
"cors": {
"origin": ["*"],
"additionalHeaders": ["cache-control", "x-requested-with"]
}
}
},
任何可能对我有解决方案的人将不胜感激!蒂亚!