Server-Side Rendering (SSR) interceptors not working [closed]

Discussão em 'Angular' iniciado por ROHIT SINGH, Abril 22, 2025.

  1. ROHIT SINGH

    ROHIT SINGH Guest

    I have developed a website using Angular with Server-Side Rendering (SSR), and I'm using interceptors.

    Here’s my setup:

    provideClientHydration(withHttpTransferCacheOptions()),
    provideHttpClient(withFetch(), withInterceptorsFromDi()),
    {
    provide: HTTP_INTERCEPTORS,
    useClass: AuthInterceptorService,
    multi: true,
    },
    {
    provide: HTTP_INTERCEPTORS,
    useClass: ErrorInterceptorService,
    multi: true,
    },


    After applying this configuration, the interceptors work perfectly. However, hydration is not functioning correctly. The website blinks twice — it seems to render first on the server side and then again on the client side.

    Continue reading...

Compartilhe esta Página