In the front-end HTML code while using fetch() to get the nearest buses from the API URL. I am getting the error -
Access to fetch at 'https://4x4x9a7f5a.execute-api.us-east-1.amazonaws.com/beta/time?route=A&lon=-73.95884749999999&lat=40.670152' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I have bypassed this issue using a proxy URL fix from "https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe/43881141"
However, we need to find an elegant way to deal with this issue
In the front-end HTML code while using fetch() to get the nearest buses from the API URL. I am getting the error -
Access to fetch at 'https://4x4x9a7f5a.execute-api.us-east-1.amazonaws.com/beta/time?route=A&lon=-73.95884749999999&lat=40.670152' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.I have bypassed this issue using a proxy URL fix from "https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe/43881141"
However, we need to find an elegant way to deal with this issue