且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Api网关不允许访问控制允许来源

更新时间:2022-12-07 22:54:27

在咨询并尝试了每种方法之后,我发现了以下错误.

After consulting and trying each method, I found the error as following.

根据AWS文档,在启用CORS之前,我们无法部署api.在部署之前,必须先设置所有有关标头和CORS的设置. 但是API网关不会阻止此设置,也不会显示任何错误对话框.即使您的设置过程显示成功,API Gateway也不会更改标题.

According to AWS document, we can not deploy our api before enabling CORS. All the settings about the header and CORS must be set before being deployed. But the API Gateway does not block this setting nor does it show any error dialog. API Gateway will not change the header even if your setting process shows success.