support both http and https for CAS