diff --git a/_redirects b/_redirects new file mode 100644 index 0000000..2da7a1c --- /dev/null +++ b/_redirects @@ -0,0 +1,3 @@ +# /_redirects + +/api/* https://takebackday.infoloom.com/:splat \ No newline at end of file diff --git a/src/gateways/locations.js b/src/gateways/locations.js index 0a7bdbe..d15221d 100644 --- a/src/gateways/locations.js +++ b/src/gateways/locations.js @@ -1,6 +1,7 @@ import mockData from '../mockData'; -const jsonEndpoint = 'https://takebackday.infoloom.com/media/output.json'; +// Actual host url is set in redirects file to avoid CORS +const jsonEndpoint = '/api/media/output.json'; export const fetchLocations = () => ( fetch(jsonEndpoint)