如何解决对子域的 Cloudfront 代理请求
我已将 www.xyz.com 设置为 Cloudfront 分发版(前端)。
我的 API 位于 api.xyz.com 上的负载均衡器后面,并且有一个指向它的公共 DNS 记录。
前端正在从 www.xyz.com/api/* 请求 API 数据以避免 CORS。
我需要将来自 www.xyz.com/api/* 的请求代理到 api.xyz.com/*
我尝试过的:
使用源域名:api.xyx.com 和无路径为分发设置另一个自定义源。
添加了另一种具有路径模式的行为:/api* 指向上面的原点。
这些请求不应该在后台正确代理吗?
我得到什么:
403 Http Error.
This distribution is not configured to allow the HTTP request method that was used for this request. The distribution supports only cachable requests. 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.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。