openvibers/openvibe.chat Commits
Chat: serve its own terms, privacy and DMCA pages (#97)
Changes
@@@ -656,6 +656,8 @@ ${attachList}`,title: `What shipped on ${SITE_NAME}`, path: '/updates', robots: 'index, follow', cache: cache.htmlHeaders({ maxAge: 300 }),body: frame.updatesBody({ service: 'chat', siteName: SITE_NAME }) + `<script src="${ovServe.url('shipped.js')}" defer></script>`,}));++ // ── Terms, privacy and DMCA for this site (openvibe-shared/legal): the Frame's footer links them here ──++ { const legal = require('openvibe-shared/legal'); router.get(legal.PATHS, legal.handler({ id: 'chat', service: 'chat', host: 'openvibe.chat', name: SITE_NAME, profile: 'ugc' })); }// ── robots.txt, llms.txt, sitemap.xml: server/web/discovery.js, the shared SEO kit ──router.use(createDiscoveryRoutes({ config }));@@@ -105,4 +105,13 @@ t('the home page carries JSON-LD: WebSite plus the site\'s primary type', async'the JSON-LD is the same for every reader');});++t('/terms, /privacy and /dmca are this site\'s own documents (the Frame\'s footer links them)', async () => {++ for (const p of ['/terms', '/privacy', '/dmca']) {++ const r = await req(p);++ assert.strictEqual(r.status, 200, p);++ assert.match(r.type, /^text\/html/);++ assert.ok(r.text.includes('openvibe.chat'), `${p} names openvibe.chat`);++ }++});++t.run(async () => { if (h && h.close) await h.close(); });
@@ -656,6 +656,8 @@ ${attachList}`,
@@ -656,6 +656,8 @@ ${attachList}`,
title: `What shipped on ${SITE_NAME}`, path: '/updates', robots: 'index, follow', cache: cache.htmlHeaders({ maxAge: 300 }),
title: `What shipped on ${SITE_NAME}`, path: '/updates', robots: 'index, follow', cache: cache.htmlHeaders({ maxAge: 300 }),
body: frame.updatesBody({ service: 'chat', siteName: SITE_NAME }) + `<script src="${ovServe.url('shipped.js')}" defer></script>`,
body: frame.updatesBody({ service: 'chat', siteName: SITE_NAME }) + `<script src="${ovServe.url('shipped.js')}" defer></script>`,
}));
}));
+ // ── Terms, privacy and DMCA for this site (openvibe-shared/legal): the Frame's footer links them here ──
+ { const legal = require('openvibe-shared/legal'); router.get(legal.PATHS, legal.handler({ id: 'chat', service: 'chat', host: 'openvibe.chat', name: SITE_NAME, profile: 'ugc' })); }
// ── robots.txt, llms.txt, sitemap.xml: server/web/discovery.js, the shared SEO kit ──
// ── robots.txt, llms.txt, sitemap.xml: server/web/discovery.js, the shared SEO kit ──
router.use(createDiscoveryRoutes({ config }));
router.use(createDiscoveryRoutes({ config }));
@@ -105,4 +105,13 @@ t('the home page carries JSON-LD: WebSite plus the site\'s primary type', async
@@ -105,4 +105,13 @@ t('the home page carries JSON-LD: WebSite plus the site\'s primary type', async
'the JSON-LD is the same for every reader');
'the JSON-LD is the same for every reader');
});
});
+t('/terms, /privacy and /dmca are this site\'s own documents (the Frame\'s footer links them)', async () => {
+ for (const p of ['/terms', '/privacy', '/dmca']) {
+ const r = await req(p);
+ assert.strictEqual(r.status, 200, p);
+ assert.match(r.type, /^text\/html/);
+ assert.ok(r.text.includes('openvibe.chat'), `${p} names openvibe.chat`);
+ }
+});
+
t.run(async () => { if (h && h.close) await h.close(); });
t.run(async () => { if (h && h.close) await h.close(); });