AWS Amplify 不转发标头

发布于 2025-01-20 02:00:35 字数 269 浏览 2 评论 0 原文

我确实在AWS Amplify上部署了NextJS应用程序,一切正常。

现在,我想在应用程序中使用接受语言标题,当我调用CloudFront Distribution域(D2A2Q apzh.cloudfront.net)时,它确实可以工作Amplify(https://main.d2u3plsd 0.Amplifyapp.com/),Accept-Language标头未被转发。

有什么想法吗?

I did deploy a nextjs application on aws amplify, everything is working well.

Now I wanted to use the accept-language header in my application, which does work when I call the cloudfront distribution domain(d2a2qapzh.cloudfront.net), but when I call the main link in amplify(https://main.d2u3plsd0.amplifyapp.com/), the accept-language header doesn't get forwarded.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦回旧景 2025-01-27 02:00:35

Amplify在后台使用CloudFront。 CloudFront与您的标头播放,因为与缓存有关的原因很少。

您可以参考标题列表

我创建了一个问题使用content_type,http_accept。它仍在他们的功能请求中。

Amplify uses Cloudfront in background. Cloudfront plays with your headers for few reasons related to caching.

You can refer that list of headers here

I had created an issue with Amplify for similar case with ACCEPT, CONTENT_TYPE, HTTP_ACCEPT. Its still in their feature requests.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文