Unvanquished / updater

QML based updater to install, update and launch the Unvanquished game.
https://unvanquished.net/download
15 stars 7 forks source link

drop stripHttpsIfWin, server does the job #44

Closed illwieckz closed 5 years ago

illwieckz commented 5 years ago

server already rewrites content to fix urls and does more than just rewriting protocol, it also takes care of www prefix, see https://github.com/Unvanquished/updater/issues/41#issuecomment-521851956 for some information about how it was done server side

Thanks to some nginx magic code, when the news json is fetched the http://www.unvanquished.net way, all url in json are rewritten the http://www.unvanquished.net, and when the news json is fetched the https://unvanquished.net, all url in json are rewritten the https://unvanquished.net way.

This way the server ensure old updater still works, and we can publish https aware updater that does not use www prefix in the future. We don't have to write any workaround in the updater code itself.

illwieckz commented 5 years ago

I'm merging this because many of my work in progress branches and PR modify the exact same lines, so I need to avoid the rebase hell.

Server was fixed in a way the updater does not need to implement this.