From 235d432e230385c49904f02f82e6124c08ea6fcb Mon Sep 17 00:00:00 2001 From: Caleb Evans Date: Fri, 9 Feb 2024 14:28:11 -0800 Subject: [PATCH] Remove Plausible Analytics --- .vscode/settings.json | 2 +- app/layout.tsx | 6 ------ app/privacy-policy/page.tsx | 13 ++----------- middleware.ts | 2 +- next.config.js | 13 +++---------- 5 files changed, 7 insertions(+), 29 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f49b4638..4c4d5ae9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode", "[typescript][typescriptreact]": { "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" } } } diff --git a/app/layout.tsx b/app/layout.tsx index 82bdd8fe..93a70b88 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,7 +1,6 @@ import '@app/fonts'; import '@styles/index.scss'; import '@styles/landing-page.scss'; -import Script from 'next/script'; import React from 'react'; export default function RootLayout({ @@ -16,11 +15,6 @@ export default function RootLayout({ name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /> - {children} diff --git a/app/privacy-policy/page.tsx b/app/privacy-policy/page.tsx index da173d4f..3f1d31cc 100644 --- a/app/privacy-policy/page.tsx +++ b/app/privacy-policy/page.tsx @@ -58,17 +58,8 @@ async function PrivacyPolicy() {

Analytics

- Faith Dashboard uses{' '} - Plausible Analytics, a - privacy-focused analytics platform. We only use this information to - examine traffic trends and aggregated visitor statistics (i.e. the - percentage of Chrome users, or the total number of people who viewed a - particular project). However, you would need to read the{' '} - - Plausible Analytics data policy - - to understand how Plausible collects and uses this information. I do not - otherwise share this information. + As of Februrary 9th, 2024, Faith Dashboard no longer collects any + analytics.

Email Privacy

diff --git a/middleware.ts b/middleware.ts index 4cc47798..30501cec 100644 --- a/middleware.ts +++ b/middleware.ts @@ -12,7 +12,7 @@ import type { Database } from './components/database.types'; // ) function generateCSP() { const nonce = crypto.randomUUID(); - return `default-src 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://hcaptcha.com https://*.hcaptcha.com; font-src 'self' https://fonts.gstatic.com data:; img-src * data:; script-src 'self' 'nonce-${nonce}' https://storage.googleapis.com https://plausible.io https://challenges.cloudflare.com; frame-src 'self' https://challenges.cloudflare.com; child-src 'self' https://challenges.cloudflare.com; connect-src *; manifest-src 'self'; media-src *;`; + return `default-src 'none'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://hcaptcha.com https://*.hcaptcha.com; font-src 'self' https://fonts.gstatic.com data:; img-src * data:; script-src 'self' 'nonce-${nonce}' https://storage.googleapis.com https://challenges.cloudflare.com; frame-src 'self' https://challenges.cloudflare.com; child-src 'self' https://challenges.cloudflare.com; connect-src *; manifest-src 'self'; media-src *;`; } // Source: diff --git a/next.config.js b/next.config.js index 22c5e904..40923f66 100644 --- a/next.config.js +++ b/next.config.js @@ -21,16 +21,9 @@ const withPWA = require('next-pwa')({ // 'SKIP_WAITING'}." (source: // https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-webpack-plugin.GenerateSW#GenerateSW) skipWaiting: false, - runtimeCaching: [ - // Fix bad-precaching-response errors from service worker due to use of - // middleware (source: https://github.com/shadowwalker/next-pwa/issues/291) - ...runtimeCaching, - // Fix no-response errors for Plausible analytics script - { - urlPattern: /^https:\/\/plausible\.io\//i, - handler: 'NetworkOnly' - } - ], + // Fix bad-precaching-response errors from service worker due to use of + // middleware (source: https://github.com/shadowwalker/next-pwa/issues/291) + runtimeCaching, buildExcludes: [ // This is necessary to prevent service worker errors; see //