我想在WordPress中使用AMP和表单操作。 我正在使用POST方法的action-xhr。
当我提交表单时,会出现以下错误:
- Response must contain the AMP-Access-Control-Allow-Source-Origin header
- Form submission failed: Error: Response must contain the AMP-Access-Control-Allow-Source-Origin header
即使尝试添加以下标头也是如此:
header("AMP-Access-Control-Allow-Source-Origin: https://www.demo.com");
问题仍然存在。 有任何建议吗?
我正在使用WordPress版本5.0.3