Solution to resource loading failure after http is upgraded to https