fix(storefront): enforce cache no-store for apiFetch to ensure live CMS parity
This commit is contained in:
parent
d5d5cea64d
commit
ef70c14efa
2 changed files with 3 additions and 0 deletions
|
|
@ -116,3 +116,4 @@ export default function GlobalError({ error, reset }: GlobalErrorProps) {
|
|||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ export async function apiFetch<T>(
|
|||
|
||||
try {
|
||||
const response = await fetch(`${baseUrl}${endpoint}`, {
|
||||
cache: rest.cache ?? 'no-store',
|
||||
...rest,
|
||||
headers,
|
||||
credentials: 'include',
|
||||
|
|
@ -103,6 +104,7 @@ export async function apiFetch<T>(
|
|||
if (refreshed) {
|
||||
headers['Authorization'] = `Bearer ${getAccessToken()}`;
|
||||
const retryResponse = await fetch(`${baseUrl}${endpoint}`, {
|
||||
cache: rest.cache ?? 'no-store',
|
||||
...rest,
|
||||
headers,
|
||||
credentials: 'include',
|
||||
|
|
|
|||
Loading…
Reference in a new issue