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

asked a year ago284 views
2 Answers
0

Something like this

Configure CORS

answered a year ago
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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions