CORS issue while running from browser

0

I am trying to build an image watermark application with Lambda and its been triggered by API. I tried the API end point run via postman with this payload:

2개 답변
0
수락된 답변

Most likely your preflight call is failing:

  1. Configure your Cloud front to allow OPTION call
  2. Configure your lambda to handle OPTION call and use Cloudfront response-headers-policies-cors
답변함 일 년 전
profile picture
전문가
검토됨 일 년 전
  • Unfortunately I cannot use Cloudfront as its basic learner lab. I also tried adding the mentioned policy in my lambda function, but still get same error Here is my lambda function

0

Hi, follow this to enable cors on api level https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors.html, as preflight call failing as mentioned above and may need to add origin header to the request.

profile picture
전문가
답변함 일 년 전
  • Unfortunately I cannot use Cloudfront as its basic learner lab. I also tried adding the mentioned policy in my lambda function, but still get same error Here is my lambda function

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

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

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

관련 콘텐츠