accomidate http and https