- Newest
- Most votes
- Most comments
When you are calling the API from your personal laptop, it is going over the public internet while when you are calling it from your work laptop, it is possible that the request is going from your corporate network to AWS over DirectConnect or VPN. And possibly some other issue is manifesting itself as a CORS issue because the request is not going to your backend but instead a Gateway response is being returned by API Gateway and CORS has not been configured properly for Gateway responses. You can get more information by looking at the developer tools on your browser to check the request and response parameters for the failed API request. Can you check this AWS Support Knowledge Center article to ensure CORS is configured correctly for your API, including for Gateway responses - https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-cors-errors/#:~:text=Cross%2DOrigin%20Resource%20Sharing%20(CORS,to%20meet%20the%20CORS%20standard.
Relevant content
- asked 10 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Thank you, with AWS support i did confirm that issue was VPN. Once i turned off VPN, everything worked fine. The question i have is , is turning off VPN the only solution?
I am not sure why VPN would need to be turned off. VPN is a valid way to connect from on-prem network to AWS. Did AWS Support provide more details on what the real issue is? Are you using custom domain names for the API Gateway? The real problem is probably somewhere else and not in the use of VPN by itself?
Thank you for the response. yes we do use custom domain names. The other thing i noticed was the request from work laptop does not even reach the API gateway without turning off VPN. Checked using cloudwatch logs. What else you think could be the issue here? yes i agree turning off VPN is not the correct solution