Closed EricSoroos closed 4 years ago
@EricSoroos the latest website version was deployed to gep-explorer-devseed-public bucket, using the following API URL:
https://gep-api-prod.us-west-2.elasticbeanstalk.com
As we already know, this endpoint doesn't serve HTTPS yet, so the site won't work. Once HTTPS is enabled, this CORS issue should be gone as the server should be adding the appropriate response headers.
Can you push a new version with these urls:
Deployed and fixed.
This (CORS error) still seems to happen if there's a timeout on the data service:
VM970:1 GET https://api.electrifynow.info/scenarios/ng-1-0_0_0_0_0_0?year=2030 502 (Bad Gateway)
(anonymous) @ VM970:1
(anonymous) @ bundle-1fff8315a0.js:1
X @ vendor-834745103f.js:1
P.u._invoke @ vendor-834745103f.js:1
ng-1?year=2030&scenario=0_0_0_0_0_0&filters=r8_2766837%7Cr0_190%7C1_3_5_6_7%7Cr0_131%7Cr0_68%7Cr15_2105:1 Access to fetch at 'https://api.electrifynow.info/scenarios/ng-1-0_0_0_0_0_0?year=2030' from origin 'https://electrifynow.info' 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.
VM970:1 Fetch failed loading: GET "https://api.electrifynow.info/scenarios/ng-1-0_0_0_0_0_0?year=2030".
Given that's it's a secondary error that happens on a fetch failure, I'm not sure that it's important.
I think this might be addressed by https://github.com/global-electrification-platform/explorer/issues/211 when done.
When serving the frontend on a different https domain than the backend, I'm getting a CORS error in the console:
I'm not sure if we can do a no-cors on the front end, or if something needs to be set on the API server.