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

Angular SSR - How to avoid caching sensitive data

$
0
0

According to Angular, SSR will cache HttpClient GET calls:

When SSR is enabled, HttpClient responses are cached while running on the server. After that this information is serialized and transferred to a browser as a part of the initial HTML sent from the server. In a browser, HttpClient checks whether it has data in the cache and if so, reuses it instead of making a new HTTP request during initial application rendering. HttpClient stops using the cache once an application becomes stable while running in a browser.

How do we ensure that authenticated endpoints are not cached? For example, what is the risk of one user's API calls with an auth token being cached on the server-side and returned to other users?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



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