简体   繁体   English

loopback 4:补丁请求被 CORS 策略阻止

[英]loopback 4 : patch request blocked by CORS policy

I get an error when I send a patch request to my api (with loopback 4) , all the other request are working fine , i get error only on patch request .当我向我的 api 发送补丁请求(使用环回 4)时出现错误,所有其他请求都工作正常,我仅在补丁请求时收到错误。

error :错误 :

Access to XMLHttpRequest at 'url api' from origin 'url web app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.从源“url web app”访问“url api”处的 XMLHttpRequest 已被 CORS 策略阻止:请求的资源上不存在“Access-Control-Allow-Origin”标头。

any idea please !!请有任何想法! this problem it was also on loopback 3 , so i think if migrate to loopback 4 i will solve the problem , but i get always the same error这个问题也在loopback 3上,所以我想如果迁移到loopback 4我会解决这个问题,但我总是得到同样的错误

当我使用 cors 扩展时,同样的错误出现在我身上删除扩展后它对我有用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM