@vtex/faststore-plugin-buyer-portal 2.0.23 → 2.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "2.0.23",
3
+ "version": "2.0.24",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -6,6 +6,7 @@ export type LoaderData<QueryType = any> = {
6
6
  res?: {
7
7
  writeHead: (status: number, headers: Record<string, string>) => void;
8
8
  end: () => void;
9
+ setHeader?: (name: string, value: string) => void;
9
10
  };
10
11
  locale?: string;
11
12
  } & (QueryType extends undefined ? { query?: never } : { query: QueryType });
@@ -22,4 +22,4 @@ export const SCOPE_KEYS = {
22
22
  CREDIT_CARDS: "creditCards",
23
23
  } as const;
24
24
 
25
- export const CURRENT_VERSION = "2.0.23";
25
+ export const CURRENT_VERSION = "2.0.24";
@@ -28,6 +28,8 @@ export const withAuthLoader = async <T>(
28
28
  options?: WithAuthLoaderOptions
29
29
  ): Promise<AuthRouteProps<T>> => {
30
30
  try {
31
+ data.res?.setHeader?.("Cache-Control", "private, no-store");
32
+
31
33
  const { cookie, userId, ...clientContext } = await getClientContext(data);
32
34
 
33
35
  const hasAccess = await (options?.validateAccess ?? validateAccessService)({