So, I have CORS that allows me to go through the basic setup provided by AWS Gateway. However, for this API, I need to enable Origins control for all requests and allow credentials.
Here is what it looks like

The problem you might have guessed is that CORS is not resolved, you cannot have a wildcard for Origin and have credentials as true. Usually the job for this is to simply grab the requesting domain and add it to the Origin header. This is more or less what I want to do. But I do not know how to get this information and add it as a display value. Where does the Gateway API store this information and how to get it?
UPDATE: I have to go through the HTTP Header Host to my Lambda function, which I should have mentioned earlier, I tried to implement the answer below, but I can’t access the header to pass it to the Lambda function using the provided instructions. Any help on this is welcome.
source
share