Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

opt-out from prevent caching of HTTP requests that require authorization

$
0
0

I have angular application with SSR and hydration

here is example of my app.config.ts

export const appConfig: ApplicationConfig = {  providers: [    provideClientHydration(),  ],};

according to this PR in Angular https://github.com/angular/angular/pull/55034

BREAKING CHANGE: By default we now prevent caching of HTTP requests that require authorization . To opt-out from this behaviour use the includeRequestsWithAuthHeaders option in withHttpTransferCache.

Example:

withHttpTransferCache({  includeRequestsWithAuthHeaders: true,})

now I don't know where exactly I can import withHttpTransferCache

I tried all of the following

import { withHttpTransferCache } from '@angular/common/http';import { withHttpTransferCache } from '@angular/platform-browser';import { withHttpTransferCache } from '@angular/core';

but I always get the error TS2305: Module "@angular/core" has no exported member withHttpTransferCache

and the usual auto import doesn't work for me


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>