无法通过 Amazon CloudFront 发送请求:403 错误



我在laravel框架上创建了一个带有crud(创建,查看,更新,删除(操作的AWS Lambda函数。

我想更新记录:

User::where('email', 'balbla@gmail.com')->update(['name' => $request->get('name')]);

但是我有这个错误:

403 ERROR
The request could not be satisfied.
Bad request. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. 
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation. 
Generated by cloudfront (CloudFront)

当我执行http get方法时,一切都完美运行。我已经阅读了有关 CloudFront 的文档,但不知道如何修复它。我用了邮递员。如果我知道问题出在$request上,我需要在 Amazon CloudFront 中创建分配。

那是我的错误。我打开了邮递员并使用 GET 方法创建了新查询,并将 json 添加到原始:

{
"name" : "bla bla some name"
}

当我删除这个json时,一切都有效

相关内容

最新更新