表格使用Amazon CDN向Squarespace网站提交问题

时间:2015-10-14 14:41:34

标签: forms ssl amazon-web-services squarespace content-delivery-network

我有一个Squarespace网站,我放在Amazon Cloudfront CDN后面以增加安全性。但是,网站上的表单不再提交。提交按钮只是闪烁,表单不发送。将记录以下控制台错误:

https://www.example.com/api/census/RecordHit 
Failed to load resource: the server responded with a status of 403 (Forbidden)
https://www.example.com/api/form/FormSubmissionKey 
Failed to load resource: the server responded with a status of 403 (Forbidden)
https://www.example.com/api/census/RecordHit 
Failed to load resource: the server responded with a status of 403 (Forbidden)

知道发生了什么事情和解决方法吗?谢谢!

1 个答案:

答案 0 :(得分:0)

禁止使用403因为您没有设置允许请求类型POST的选项

在CloudFront分配中,转到:行为>允许的HTTP方法 选择选项:GET,HEAD,OPTIONS,PUT,POST,PATCH,DELETE

此外,如果您在加载网站时遇到问题,请确保使用.squarespace.com作为原点,而不是ext-cust.squarespace.com。这也困扰了我,我认为这与转发的标题有关。