async function getIcalData() {
return await fetch('https://harzdomicile.de/wp-content/uploads/wpfewo-booking/ical/63301.ical');
}
getIcalData().then(promise => promise.text()).then(response => this.vacancyCalendar.setAttribute('reservations', new CalendarReservations(response).convertJsonReservationsToString()));
Получаю вот такую ошибку:
Access to fetch at '
https://harzdomicile.de/wp-content/uploads/wpfewo-...' from origin '
localhost:63342' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Как решить? При открывании ссылки из браузера - всё прекрасно работает. (с промисами сталкиваюсь впервые)