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
回答済み 1年前
profile picture
エキスパート
レビュー済み 1年前
  • 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
エキスパート
回答済み 1年前
  • 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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ