CORS Policy error No 'Access-Control-Allow-Origin'


Currently contains 2 posts


January 30, 2019 00:21

Roman Kitainik

Running this code in Chrome console:

var wuAppId = ‘xxx’;
var wuAppKey = ‘yyy’;
jQuery.getJSON(‘,WW.12’ + ‘?app_id=’ + wuAppId + ‘&app_key=’ + wuAppKey)
.done(function(data) {
event: ‘weatherDone’,
weather: data.wx_desc,
temperature: data.temp_c
}).fail(function(jq, status, msg) {
console.log(’Weather request failed: ’ + status + ’ – ’ + msg);

results in the following message:

Access to XMLHttpRequest at ‘,WW.12?app_id=xxx&app_key=yyy’ from origin ‘https://sub.domain.tld’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Is there anything I can do on my side to fix it? Thanks.


November 28, 2019 14:42

Manon Heine

use a proxy like if you only have a frontend built, or build your own proxy (faster response time), for example—W/cors-anywhere/#documentation

Reply to thread
  1. If you're human, leave this field empty.