ENH,SEC: Add JS redirect to HTTPS if not on localhost