diff --git a/public/sw.js b/public/sw.js index 56784df..58aa78f 100644 --- a/public/sw.js +++ b/public/sw.js @@ -6,7 +6,6 @@ const APP_SHELL = [ self.addEventListener('install', (event) => { event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL))) - self.skipWaiting() }) self.addEventListener('activate', (event) => { @@ -62,7 +61,7 @@ self.addEventListener('pushsubscriptionchange', (event) => { await fetch('/api/notifications/subscribe', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ subscription }), + body: JSON.stringify({ subscription: subscription.toJSON() }), }) })()) }) diff --git a/server/server.js b/server/server.js index 4d29fce..39cec16 100644 --- a/server/server.js +++ b/server/server.js @@ -470,7 +470,10 @@ const serveStatic = (req, res) => { '.webmanifest': 'application/manifest+json', } const headers = { 'Content-Type': types[ext] || 'application/octet-stream' } - if (path.basename(safePath) === 'sw.js' || ext === '.html' || ext === '.webmanifest') { + if (path.basename(safePath) === 'sw.js') { + headers['Service-Worker-Allowed'] = '/' + headers['Cache-Control'] = 'no-store' + } else if (ext === '.html' || ext === '.webmanifest') { headers['Cache-Control'] = 'no-store' } else if (safePath.startsWith(path.join(distDir, 'assets'))) { headers['Cache-Control'] = 'public, max-age=31536000, immutable' diff --git a/src/App.vue b/src/App.vue index 6df60f0..a7879df 100644 --- a/src/App.vue +++ b/src/App.vue @@ -119,18 +119,11 @@ const MEMBERSHIP_ID_PATTERN = /^L484-\d{4}-[A-Z0-9]{6}$/ const DATA_IMAGE_PATTERN = /^data:image\/png;base64,[A-Za-z0-9+/=]+$/ const NPUB_PATTERN = /^npub1[023456789acdefghjklmnpqrstuvwxyz]+$/ const covenantItems = [ - 'I am joining a private, members-only association, not a public business.', - "Participation in L484's activities, meals, and services is limited to accepted members only.", - 'All exchanges of goods or services within L484 are private & internal.', - 'Suggested contribution amounts communicated by L484 are internal coordination references only, not public prices.', - 'Participation is voluntary and undertaken at my own risk within a private context.', - 'Membership is granted for a 24-hour period beginning upon acceptance of this application, unless ended earlier by the member or by L484.', - "Any disputes will be resolved privately and consistent with L484's ecclesiastical and contractual principles contained in this covenant.", - 'I acknowledge that my membership, participation, and personal information are confidential, and that I will respect the privacy of L484 and other members.', - 'I acknowledge that L484 operates under internal Articles, Bylaws, and policies, which are not publicly distributed, and that I do not acquire governance, voting, or inspection rights by virtue of my membership.', - 'I acknowledge and accept that I may have interacted with L484 or its activities prior to completing this application, and I agree that such interactions are part of my voluntary participation as a member.', - "I agree to abide by L484's rules, governance, and confidentiality requirements, as outlined in this Covenant.", - 'I agree not to represent L484 or its activities as open to the public or as a commercial entity.', + 'I am joining L484 as a private, members-only association.', + "L484 activities, meals, and services are limited to accepted members and handled privately.", + 'Suggested contributions are internal coordination references, not public prices.', + 'Participation is voluntary, confidential, and at my own risk within a private context.', + "I agree to L484's rules, governance, privacy expectations, and private dispute process.", ] const activeBackground = ref(0) const loadedHeroBackgroundIndexes = ref(new Set([0])) @@ -3542,10 +3535,6 @@ watch(mobileMenuOpen, (open) => {