fix http/https resource loading