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
posta 8 mesi fa167 visualizzazioni
1 Risposta
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
ESPERTO
con risposta 8 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande