backport of #11744 to maintanance branch
As described in the Angular docs, a HttpResponse.url can be null or string. Therefore it should be checked in the AnonymousConsentsInterceptor before accessing it with startsWith.
By the way, now we export AnonymousConsentsInterceptor in the public API. There is no reason to hide it in the private API.
因为根据Angular文档,url 可以为null,因此在调用其方法之前,要先检查其是否可用。