allOrigins icon indicating copy to clipboard operation
allOrigins copied to clipboard

Invalid JSONP response - Error shows DOCTYPE HTML code

Open Sebbo94BY opened this issue 2 years ago • 1 comments

Since a few hours, I have the problem, that the below code snippet...

$.ajax({
	type: "GET",
	url: "https://api.allorigins.win/get?url=" + encodeURIComponent("https://www.teamspeak.com/versions/client.json"),
	dataType: "json",
        [...]
});

...fails with this error:

Uncaught SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at Object.success ((index):1349:15)
    at c (jquery-3.6.0.min.js:2:28327)
    at Object.fireWith [as resolveWith] (jquery-3.6.0.min.js:2:29072)
    at l (jquery-3.6.0.min.js:2:79901)
    at XMLHttpRequest.<anonymous> (jquery-3.6.0.min.js:2:82355)

Is this maybe related to https://github.com/gnuns/allOrigins/issues/115?

The code worked fine and as expected for the past months.

Could you please check, what's wrong here on the API side? Or did anything change?

Sebbo94BY avatar Dec 23 '22 01:12 Sebbo94BY