how do i disable spartacus default calls?

I found a way to do this by creating a custom interceptor and using NEVER from rxjs:

    request: HttpRequest<any>,
    next: HttpHandler
  ): Observable<HttpEvent<any>> {

     * Deny list for calls we do not want to use from the Spartacus storefront

    if (request.url.includes('consenttemplates') || request.url.includes('carts') || request.url.includes('users/current')) {
      return NEVER;
    } else {
      return next.handle(request);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top