McLive / api.minetools.eu

Issuetracker for the Minetools API.
2 stars 0 forks source link

No jsonp support #2

Closed 1001v closed 8 years ago

1001v commented 8 years ago

Hello. Please add jsonp support for your api.

McLive commented 8 years ago

Hi,

why do you need jsonp? MineTools supports Cross-Origin Resource Sharing. That should be enough these days.

1001v commented 8 years ago

Well, my browser says, no access-control-allow-origin header in your server response. That problem appeared about two months ago, i think. So i thought something changed in api policy.

McLive commented 8 years ago

What browser and version do you use?

I do see that header in my browser.

20160911223407

1001v commented 8 years ago

That is chrome for linux.

McLive commented 8 years ago

You should try updating it to the latest version. I don't really understand why you shouldn't have the header because it is definitely there.

1001v commented 8 years ago

Strange. Probably this's a bug (or feature) with legacy angularjs's $http service, because i have reports about the same code working in other people's chrome browsers sometimes. Probably some security updates for legacy version have appeared throw cdn. I think i'll need some more time to deal with this. Thanks for quick answers, anyway.

McLive commented 8 years ago

Which chrome version are you running? I just tried your application and it works fine for me.

I'm running chrome Version 52.0.2743.116 m

1001v commented 8 years ago

My version is 53.0.2785.92 (64-bit), but i have this problem in any browser, if i use my angular app. If i access api directly, everything ok with headers. I just thought you've stoped responding cross-domain requests when i saw browser became to block requests. So it's my-side problem, i think.

McLive commented 8 years ago

Hmm that's really weird. You could try to use the https URL to connect to the API because you save the redirect from http zu https then.

1001v commented 8 years ago

Https did the trick, thank you.

McLive commented 8 years ago

Awesome. I also just added the CORS header to the redirect from http to https. Never knew that is required.

Thanks for reporting that issue.