Use https iff isProd

Hacky and wrong but at least it mostly works