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.
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 sideThanks to some nginx magic code, when the news json is fetched the
http://www.unvanquished.net
way, all url in json are rewritten thehttp://www.unvanquished.net
, and when the news json is fetched thehttps://unvanquished.net
, all url in json are rewritten thehttps://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.