invalidate cache to help with CF cache
This commit is contained in:
parent
8c23c68565
commit
cd40ede713
1 changed files with 7 additions and 0 deletions
|
|
@ -172,6 +172,13 @@ export const handle: Handle = async ({ event, resolve }) => {
|
|||
|
||||
event.locals.userSession = userData;
|
||||
|
||||
if (event.url.pathname.startsWith('/api/')) {
|
||||
const response = await svelteKitHandler({ event, resolve, auth });
|
||||
response.headers.set('Cache-Control', 'no-store, no-cache, must-revalidate, private');
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
return svelteKitHandler({ event, resolve, auth });
|
||||
};
|
||||
|
||||
|
|
|
|||
Reference in a new issue