aws-lex-web-ui icon indicating copy to clipboard operation
aws-lex-web-ui copied to clipboard

Parent page stops working when setting the parent origin to host origin

Open kmaramr opened this issue 1 year ago • 3 comments

We are trying to add the chatbot to our web app (separate from lex web ui) and had to update the parent origin. Once we did that the parent.html or any other lex we ui pages started throwing the CORS errors.

Obviously there seems to be a better way, please advise.

kmaramr avatar Aug 10 '22 02:08 kmaramr

@kmaramr Did you use the Cloud Formation console and update the CF stack previously deployed and change the template parameter WebAppParentOrigin to match the new origin? This usually performs the change successfully. If you have not updated the CF stack, this is one change you need to make. I've also seen CloudFront then take some time to clear its caches after an invalidation to properly reset CORS information in its cache. You may need to wait some period of time. You can also manually invalidate the cloudfront distribution hosting the lex-web-ui and see if this kicks cloudfront along. Finally you toggle back and forth the Cache Policy and Origin request policies between legacy cache settings and policy based settings in the cloudfront distribution's behavior. I've seen this move CloudFormation updates along as well.

bobpskier avatar Aug 10 '22 02:08 bobpskier

@bobpskier We have updated the parentOrigin and updated the CF stack. Invalidated the CloudFront distribution and got the new page working. Bot now throws CORS errors on the Parent.html/index.html

kmaramr avatar Aug 10 '22 18:08 kmaramr

@kmaramr The comment for issue 374 provides a list of items to check to help resolve CORS issues. Can you supply a link to the parent page to debug?

bobpskier avatar Aug 11 '22 13:08 bobpskier