Hi! I want to make GET request to an api through client side script.
Code fragment:
frappe.call({
method: “GET”,
url: https://api.nbp.pl/api/exchangerates/rates/a/EUR/${formattedYesterdayDate}/
,
Unfortunatley, I get Access to XMLHttpRequest at ‘https://api.nbp.pl/api/exchangerates/rates/a/EUR/2023-02-10/’ from origin ‘https://mysiteaddress’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I already have allow_cors | * in my site config, which I validated through bench show-config
I cannot manage to change cors policy on my server to overcome this, I would be thankful for any help!