take into account _use_ssl for endpoints