I'm Using AWS API with Cognito Security authentication in web app.when i call my api without overwriting integration request body mapping template it's working fine.but when i put below few lines in integration request body mapping template like below
#set($inputRoot = $input.path('$'))
{
'UserId' :'$context.authorizer.claims.email',
'Name' :'$context.authorizer.claims.name',
'UniqueID' :'$context.authorizer.claims.sub'
}
…it gives me below error:
XMLHttpRequest cannot load https://ei25XXXXXXg.execute-api.us-east-2.amazonaws.com/Development/userlogin/getcurrentuser. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:7080' is therefore not allowed access. The response had HTTP status code 400.
but i already enable 'Access-Control-Allow-Origin' to '*' already. does anybody has any idea..?