Lambda Function URL config (for jquery JSON post)?

0

Hey folks,

I'm trying to configure my Lambda Function URL to accept a captcha protected web form post from the browser. I've enabled CORS but it is still not working.

"responded with a status of 403 () ...' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response....

I've allowed POST, but I'm guessing. Any guidance? Thanks,

M.

Mac
質問済み 6ヶ月前137ビュー
1回答
0

This means that you are not including Content-Type in the list of headers included in the access-Control-Request-Headers header in your HTTP OPTIONS request.

CORS can be complex - you need to reply to that OPTIONS request (a CORS PreFlight Request) with a response that includes a Access-Control-Allow-Headers header that lists the headers out of Access-Control-Request-Headers that you would allow to be used in future CORS requests.

Refer too https://fetch.spec.whatwg.org/#http-cors-protocol for detail on how this works.

AWS
エキスパート
回答済み 6ヶ月前

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

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

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

関連するコンテンツ