Properly respect secure connections