@dargmuesli/nuxt-vio 3.0.0-beta.7 → 3.0.0-beta.9

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dargmuesli/nuxt-vio",
3
- "version": "3.0.0-beta.7",
3
+ "version": "3.0.0-beta.9",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -11,6 +11,9 @@ export default defineNuxtPlugin((nuxtApp) => {
11
11
  bootstrap: !!cookieControl.cookiesEnabledIds.value?.includes('ga'),
12
12
  config: {
13
13
  id: config.public.googleAnalyticsId,
14
+ params: {
15
+ cookie_flags: 'secure;samesite=strict',
16
+ },
14
17
  },
15
18
  },
16
19
  router,
@@ -6,11 +6,7 @@ import { TIMEZONE_HEADER_KEY } from '../../utils/constants'
6
6
  import { getTimezone } from '../../utils/networking'
7
7
 
8
8
  export default defineEventHandler(async (event) => {
9
- setRequestHeader(
10
- event,
11
- TIMEZONE_HEADER_KEY,
12
- (await getTimezone(event)) || 'UTC',
13
- )
9
+ setRequestHeader(event, TIMEZONE_HEADER_KEY, await getTimezone(event))
14
10
  // setContentSecurityPolicy(event);
15
11
  setResponseHeaders(event)
16
12
  })
@@ -25,7 +21,7 @@ export default defineEventHandler(async (event) => {
25
21
  // );
26
22
  // };
27
23
 
28
- const setRequestHeader = (event: H3Event, name: string, value: string) => {
24
+ const setRequestHeader = (event: H3Event, name: string, value?: string) => {
29
25
  event.node.req.headers[name] = value
30
26
  }
31
27