bschug / poedit

Path of Exile ItemScript Editor / Preview
20 stars 5 forks source link

load jquery via https #24

Closed srouquette closed 9 years ago

srouquette commented 9 years ago

it was breaking the functionality to load a script from pastebin.

bschug commented 9 years ago

Pastebin integration works only when accessing the site via plain http. This is because the same origin policy doesn't allow us to directly access Pastebin from the browser. I need to access Pastebin through a php script on my own server that wraps it into JSONP. Since I don't have a valid SSL certificate on that server, https will fail in any case.

Or am I misunderstanding what you are trying to fix here?

srouquette commented 9 years ago

ok. when I try to load a script from pastebin, it doesn't work and there are some error in the console (can't load jquery, then it can't resolve $). I thought that was the problem, and my patch fixed it at least locally. try to load your url with https and see if it works. I use HTTPS Everywhere, but I think github switch automatically to https by default.

bschug commented 9 years ago

Does it load the pastebin data with your fix if you use https? It should still show an error when it tries to access bschug.net to fetch the pastebin content. GitHub only switches to https on the actual github page. The poedit page does not automatically redirect, at least for me. You are right that there should be https support, but for that I will have to buy an SSL certificate for my domain. Or find another way to access Pastebin via JSONP, but when I first implemented this, I didn't find any.

I'll still merge this in now because it's good practice and doesn't break anything even though the problem still remains.

srouquette commented 9 years ago

yeah sadly it didn't fix the problem. Thanks anyway for adding a popup and a fallback :)