v2.5.2
Giriş yap

Access to fetch (CORS) hatası alıyorum.

mertnrist
1,085 defa görüntülendi ve 1 kişi tarafından değerlendirildi
    guncer_kur() {
        let url = "https://api.genelpara.com/embed/doviz.json";
        fetch(url)
            .then(response => response.json())
            .then(response => {
                for (let bilgi in response) {
                    let title = bilgi;
                    let alis = response[bilgi]['alis'];
                    let satis = response[bilgi]['satis'];

                    this.container_right.innerHTML += `
                        <div class="card">
                            <div class="card-title">${title}</div>
                            <div class="card-info">
                                <div class="card-alis">${alis} ₺</div>
                                <div class="card-satis">${satis} ₺</div>
                            </div>
                        </div>                    
                    `
                }
            })

    }

Projenin Tam Hali / Deploy
Yaklaşık 3 gündür araştırıyorum fakat sorunu çözemedim. (Farklı API'ler üzerinde denedim yine aynı hatayı aldım, Eklenti kurarak çözebiliyorum fakat bunu siteye giren herkesin yapması gerekiyor.)

Hatanın görseli

Yazılı Hali

Access to fetch at 'https://api.genelpara.com/embed/doviz.json' from origin 'https://fessqer.github.io' 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.
admin
843 gün önce

cors anywhere