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?

Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions