HTTP API Gateway - what goes into CORS Screen

0

Hi,

I have an HTTP API (the purple logo not yellow REST API one). I am getting a CORS rejection. Can someone guide me on what I should enter into the screen to make it work.

I only have a GET query in my case.

CORS screen from HTTP API Gateway section

Thanks

preguntada hace un año295 visualizaciones
2 Respuestas
0

Something like this

Configure CORS

respondido hace un año
0

I copied the settings suggested by @Nitin but this did not work for me.

I am attaching the headers:

General  
    Request URL: https://<aws_URL>.execute-api.us-east-1.amazonaws.com/generatePassword?passLen=20&useDigits=1&useLower=1&useUpper=1&useSpecial=1&firstAlfaNum=1  
Request Method: GET  
Status Code: 200  
Referrer Policy: strict-origin-when-cross-origin  

Response Headers  
Apigw-Requestid: GwzicjlnoAMEJEw=  
Content-Length: 37  
Content-Type: text/plain; charset=utf-8  
Date: Mon, 19 Jun 2023 10:50:04 GMT  

Request Headers  
:Authority: <aws_URL>.execute-api.us-east-1.amazonaws.com  
:Method: GET  
:Path: /generatePassword?passLen=20&useDigits=1&useLower=1&useUpper=1&useSpecial=1&firstAlfaNum=1  
:Scheme: https  
Accept: */*  
Accept-Encoding: gzip, deflate, br  
Accept-Language: en-US,en;q=0.9  
Cache-Control: no-cache  
Origin: null  
Pragma: no-cache  
Sec-Ch-Ua: "Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"  
Sec-Ch-Ua-Mobile: ?0  
Sec-Ch-Ua-Platform: "Windows"  
Sec-Fetch-Dest: empty  
Sec-Fetch-Mode: cors  
Sec-Fetch-Site: cross-site  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
respondido hace un año

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