Adding "Access-Control-Allow-Origin" custom header to AWS Appsync GraphQL Response

0

I want to add / change "Access-Control-Allow-Origin" and "Strict-Transport-Security" headers in my Appsync response. I found a method for sending the custom headers (https://aws.amazon.com/about-aws/whats-new/2022/02/aws-appsync-support-custom-response-headers/) in res.vtl file and I am able to set the "Strict-Transport-Security" header by using that method.

But when I tried the same for "Access-Control-Allow-Origin", it is throwing the error "The header name Access-Control-Allow-Origin is restricted and cannot be included as a custom header."

Any other way, we can modify this header value?

回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ