From d1269706813d0a9afc623ccc1c7fc9dff9537c57 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Fri, 28 Jul 2023 13:09:38 +0100 Subject: [PATCH 01/17] Update Docker for Traefik --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 35dc2fc5..21dfe6b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM node:18-alpine WORKDIR /app -ENV IZNIK_API_V1=http://apiv1/api \ - IZNIK_API_V2=http://apiv2:8192/api +ENV IZNIK_API_V1=http://apiv1.localhost/api \ + IZNIK_API_V2=http://apiv2.localhost/api RUN apk update && apk add git \ && git clone https://github.com/Freegle/iznik-nuxt3.git From b7f1115f22e2f1639ca2eba4fc8d20259714921d Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Fri, 28 Jul 2023 13:22:36 +0100 Subject: [PATCH 02/17] Update Docker for Traefik --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 21dfe6b8..b3fdea42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM node:18-alpine WORKDIR /app -ENV IZNIK_API_V1=http://apiv1.localhost/api \ - IZNIK_API_V2=http://apiv2.localhost/api +ENV IZNIK_API_V1=https://apiv1.localhost/api \ + IZNIK_API_V2=https://apiv2.localhost/api RUN apk update && apk add git \ && git clone https://github.com/Freegle/iznik-nuxt3.git From e826912f7fa76981a0d4504e4a66e3b0bb464ce4 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Mon, 31 Jul 2023 10:49:21 +0100 Subject: [PATCH 03/17] Remove Inspectlet from privacy policy. --- pages/privacy.vue | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pages/privacy.vue b/pages/privacy.vue index 61be6523..5f7206c0 100644 --- a/pages/privacy.vue +++ b/pages/privacy.vue @@ -101,21 +101,6 @@ here.

-

Inspectlet

-

- On a small random fraction of sessions, we use - Inspectlet. This helps us work out which bits of the website are working well - for freeglers, and which aren't. You can read their privacy policy - here, and opt out of this - here. -

Deleting your data

If you want to leave Freegle, please go @@ -132,6 +117,7 @@

Change History

Here are the changes to this page.

    +
  • 31/07/2023: Remove Inspectlet, which we no longer use.
  • 04/02/2023: Removed Google Analytics, which we no longer use. Add mention of cookies. From 89394ae50d39098f16eb33e9d1d6e2b113091446 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Thu, 3 Aug 2023 11:13:09 +0100 Subject: [PATCH 04/17] Update Docker for Traefik --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3fdea42..21dfe6b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,8 @@ FROM node:18-alpine WORKDIR /app -ENV IZNIK_API_V1=https://apiv1.localhost/api \ - IZNIK_API_V2=https://apiv2.localhost/api +ENV IZNIK_API_V1=http://apiv1.localhost/api \ + IZNIK_API_V2=http://apiv2.localhost/api RUN apk update && apk add git \ && git clone https://github.com/Freegle/iznik-nuxt3.git From cf1c8896c05536245730130ecab9ebfbf13471d4 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Thu, 3 Aug 2023 11:52:35 +0100 Subject: [PATCH 05/17] Update Docker for Traefik --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 21dfe6b8..bb28d734 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,4 @@ RUN apk update && apk add git \ CMD cd iznik-nuxt3 \ && git pull \ && yes | npm install -y --legacy-peer-deps \ - && export NODE_OPTIONS=--max-old-space-size=8192;npm run build \ - && npm run start \ No newline at end of file + && export NODE_OPTIONS=--max-old-space-size=8192;export HOST=0; npm run dev \ No newline at end of file From 655ca0abec7708c1dd9a38d7b71ccf54240fbcd3 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Thu, 3 Aug 2023 12:21:21 +0100 Subject: [PATCH 06/17] Update Docker for Traefik --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bb28d734..aa7ecc72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,5 @@ RUN apk update && apk add git \ CMD cd iznik-nuxt3 \ && git pull \ && yes | npm install -y --legacy-peer-deps \ - && export NODE_OPTIONS=--max-old-space-size=8192;export HOST=0; npm run dev \ No newline at end of file + && export NODE_OPTIONS=--max-old-space-size=8192;npm run build \ + && export HOST=0; npm run start \ No newline at end of file From e45e1284cc865179450c704fefb758b34202559d Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Thu, 3 Aug 2023 13:41:54 +0100 Subject: [PATCH 07/17] Update Docker for Traefik --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aa7ecc72..5a996491 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM node:18-alpine WORKDIR /app ENV IZNIK_API_V1=http://apiv1.localhost/api \ - IZNIK_API_V2=http://apiv2.localhost/api + IZNIK_API_V2=http://apiv2.localhost:8192/api RUN apk update && apk add git \ && git clone https://github.com/Freegle/iznik-nuxt3.git From e161351a9a31fa301df8f7d375db03c6da70ac89 Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Thu, 3 Aug 2023 15:58:42 +0100 Subject: [PATCH 08/17] Prevent us storing a null cookie when logged out --- stores/auth.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/stores/auth.js b/stores/auth.js index 597ad986..6be80205 100644 --- a/stores/auth.js +++ b/stores/auth.js @@ -64,10 +64,15 @@ export const useAuthStore = defineStore({ if (process.client) { // Store the values in cookies. This means they are accessible during SSR. - const j = useCookie('jwt') - const p = useCookie('persistent') - j.value = jwt - p.value = JSON.stringify(persistent) + if (jwt) { + const j = useCookie('jwt') + j.value = jwt + } + + if (persistent) { + const p = useCookie('persistent') + p.value = JSON.stringify(persistent) + } } }, setUser(value) { From d6a76d434c5b186e020a0904ebd5eae9dc31439f Mon Sep 17 00:00:00 2001 From: Edward Hibbert Date: Thu, 3 Aug 2023 16:04:17 +0100 Subject: [PATCH 09/17] Add Google Analytics 4, update privacy. --- app.vue | 6 +- nuxt.config.ts | 7 + package-lock.json | 4209 ++-------------------------- package.json | 1 + pages/privacy.vue | 13 +- plugins/google-analytics.client.js | 46 + 6 files changed, 306 insertions(+), 3976 deletions(-) create mode 100644 plugins/google-analytics.client.js diff --git a/app.vue b/app.vue index 0eb7e0af..15208935 100644 --- a/app.vue +++ b/app.vue @@ -10,7 +10,6 @@