Setting security for http x https connection