API CORS issues

Post Reply
Moru
Posts: 125
Joined: 26 May 2020 18:37
Country: Sweden
Contact:

API CORS issues

Post by Moru »

I'm playing around with a simple page for alternative way of displaying turf where I can actually see zones (bad eye-sight creeping up). When I tested a few moths ago I could get zones from the API without turning off CORS, but now it does not work any more. Is this by design and I need to cache the zones myself or am I supposed to be able to fetch zones from the API in my javascript app?
Turfname is EQ
User avatar
LordNorth
Posts: 62
Joined: 24 May 2022 22:16
Country: Norway
Contact:

Re: API CORS issues

Post by LordNorth »

You probably need something in between to relay or proxy your requests so you can set proper CORS headers. For https://turf.mitt.land/ I used Varnish Cache as a proxy.
@LordNorth - Creator of The Improved Turf Profile Page https://turfmedals.com
Post Reply

Return to “Third-party”