Open neelananda opened 3 years ago
We are using API gateway Developer Portal. All our APIs are API Gateway APIs. Everything is working fine with default cloudfront domain name but we have an issue, when we are using our own custom domain configured in cloudfront and setting origin as the developer portal. We followed the instructions mentioned here(https://github.com/awslabs/aws-api-gateway-developer-portal) to set-up the custom domain. To setup the custom domain new certificate and deployed through SAM as per the above link. The issue we are facing is that we are getting CORS error when we navigate to either Admin page or API page and none of the API data is getting populated.
It would be of great help, if some can guide us on this
Yester day we found that when API gateway invoked Lambda function(Developer Portal) , Lambda function returning CORS header with value of default cloudfront domain instead of custom domain. We are trying to find out where the logic need to be changed to set the proper CORS value. Any help in this really appreciated
Actually, if you update the Cloudformation it will update in the API GW - Integration Response - Header Mappings. The problem most likely is the Cloudformation template won't deploy the stage which was modified and that's why you will see that error. Just go to the API GW and deploy to the prod stage, it will work after few minutes.
Actually, if you update the Cloudformation it will update in the API GW - Integration Response - Header Mappings. The problem most likely is the Cloudformation template won't deploy the stage which was modified and that's why you will see that error. Just go to the API GW and deploy to the prod stage, it will work after few minutes.
Deploying prod stage from API Gateway worked for me. Thank you @lrfsh !
We are using API gateway Developer Portal. All our APIs are API Gateway APIs. Everything is working fine with default cloudfront domain name but we have an issue, when we are using our own custom domain configured in cloudfront and setting origin as the developer portal. We followed the instructions mentioned here(https://github.com/awslabs/aws-api-gateway-developer-portal) to set-up the custom domain. To setup the custom domain new certificate and deployed through SAM as per the above link. The issue we are facing is that we are getting CORS error when we navigate to either Admin page or API page and none of the API data is getting populated.
It would be of great help, if some can guide us on this