0

I have to make a call to the provided URL (https://www.cnb.cz/en/financial-markets/foreign-exchange-market/central-bank-exchange-rate-fixing/central-bank-exchange-rate-fixing/daily.txt).

However, when I make this call, I immediately run into an issue. Specifically, I get an error saying that

"[request] has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains the invalid value 'apl.cnb.cz'.

I can try disabling CORS, but then the request I get is "opaque." TLDR, I cannot get any data from an "opaque," request, as stated here: how to process fetch response from an 'opaque' type?, so I'm not able to get the currency exchange information in the text file.

I tried a number of work arounds, including spinning up my own Heroku proxy suggested here: No 'Access-Control-Allow-Origin' header is present on the requested resource—when trying to get data from a REST API. No luck there either. After some research, it seems like in order to best deal with CORS, it requires modifying things on the server side (which is for the Czech Currency folks to handle). Is there any way I can still access the data by modifying my request?

0 Answers0