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
preguntada hace 6 meses137 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace 6 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas