diff --git a/layers/chains/culvers/layer.js b/layers/chains/culvers/layer.js index 96b5560..946647c 100644 --- a/layers/chains/culvers/layer.js +++ b/layers/chains/culvers/layer.js @@ -35,7 +35,7 @@ vectorLayer.customPopupCallback = async function(feature) { fotd_parent.append(fotd_child, fotd_image); const [long, lat] = toLonLat(feature.getGeometry().getCoordinates()); - const res = await fetch(`https://corsproxy.io/?${encodeURIComponent(`https://www.culvers.com/api/locator/getLocations?lat=${lat}&long=${long}&limit=1&t=${Date.now()}`)}`) + const res = await fetch(`https://api.allorigins.win/raw?url=${encodeURIComponent(`https://www.culvers.com/api/locator/getLocations?lat=${lat}&long=${long}&limit=1&t=${Date.now()}`)}`) const res_data = await res.json(); fotd_child.innerHTML = res_data.data.geofences[0].metadata.flavorOfDayName; fotd_image.src = `https://cdn.culvers.com/menu-item-detail/${res_data.data.geofences[0].metadata.flavorOfDaySlug}`; diff --git a/main.js b/main.js index f6b3f37..ea0b32c 100644 --- a/main.js +++ b/main.js @@ -225,7 +225,7 @@ function newCustomLayer(name, sourceURL, colorString) { source: new VectorSource({ // In case people put in layers that don't serve proper CORS headers, we // wrap them in this proxy so they Just Work. - url: `https://corsproxy.io/?${encodeURIComponent(sourceURL)}`, + url: `https://api.allorigins.win/raw?url=${encodeURIComponent(sourceURL)}`, format: new GeoJSON, }), style: new Style({