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?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인