I am trying make AJAX request to external url and try to get Json data from that url. I am getting 401- Authorization error saying that its insecured content when try access the url. Here below is my code. Please advise
function check() {
var ENV_URL = 'http://../BlueLight/api/BlueLights/getActiveBlueLight';
$('#trBlueLight').hide();
$.getJSON(ENV_URL+"&callback=?", function (data) {
if (data.expDate != null) {
$('#trBlueLight').show();
} else {
$('#trBlueLight').hide();
}
});
}
So the is to long for a comment. I assume you create the following file proxy_loader.php and put into your webservers root directory (normaly httpdocs). It must be accessible from https://domain.tdl/proxy_loader.php
the file should look like this:
Now you could request a url through your server using a function like this: