Use http or https resources depending on scheme of website server