Podcast Commission Stack: kit under Promo tools > Network sites (read from its own /api/promo-kit feed, placed after Video App Income, added quietly: no notice, no release note) and the email-check code mail for its network gate. siteinvite.js: each site signs with its own secret (SITE_INVITE_SECRET_PCS for the new site, SITE_INVITE_SECRET unchanged for Video App Income), verify() names the signing site and a body that names any other site is refused; the new site has the code call only, no invite emails; the code limits stay one count for all sites (5 an hour per address, 2,000 a day). Chatbot answer + prompt, KNOWLEDGE_DATE 2026-11-25; qa/site-invite.test.mjs 52 -> 80 checks, routing rows in qa/chatbot-parse.mjs

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-25 09:32:18 -06:00
parent 563407e45b
commit c5b9624eda
7 changed files with 117 additions and 22 deletions
+2 -2
View File
@@ -1060,7 +1060,7 @@ const MIME = { '.html': 'text/html; charset=utf-8', '.css': 'text/css', '.js': '
'.png': 'image/png', '.jpg': 'image/jpeg', '.svg': 'image/svg+xml', '.webp': 'image/webp',
'.ico': 'image/x-icon', '.json': 'application/json', '.mp4': 'video/mp4', '.woff2': 'font/woff2',
'.gif': 'image/gif', '.webm': 'video/webm', '.vtt': 'text/vtt; charset=utf-8', '.txt': 'text/plain; charset=utf-8', '.xml': 'application/xml; charset=utf-8' };
const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://www.networkadspace.com https://networkadspace.com https://polhunter.com 'sha256-NzvNrqk5jB9YZATwo5BF4JoRlJ02HsnFikbKXgEPdaQ=' " + themehead.CSP_HASH + "; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' https: blob:; connect-src 'self' https://polhunter.com https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com https://linkspin.app https://downlinebanners.com https://viralbannerblitz.com https://viraladblitz.com https://viraladsource.com https://yourprogrambuilder.com https://downlinehydra.com https://5xyourteam.com https://videoappincome.com; font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: http:";
const CSP = "default-src 'self'; script-src 'self' https://cdn.jsdelivr.net https://www.networkadspace.com https://networkadspace.com https://polhunter.com 'sha256-NzvNrqk5jB9YZATwo5BF4JoRlJ02HsnFikbKXgEPdaQ=' " + themehead.CSP_HASH + "; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: blob: https:; media-src 'self' https: blob:; connect-src 'self' https://polhunter.com https://*.walletconnect.com wss://*.walletconnect.com https://*.walletconnect.org wss://*.walletconnect.org https://*.reown.com wss://*.reown.com https://*.reown.org wss://*.reown.org https://*.web3modal.org https://*.drpc.org https://*.publicnode.com https://*.coinbase.com https://linkspin.app https://downlinebanners.com https://viralbannerblitz.com https://viraladblitz.com https://viraladsource.com https://yourprogrambuilder.com https://downlinehydra.com https://5xyourteam.com https://videoappincome.com https://podcastcommissionstack.com; font-src 'self' data: https://fonts.gstatic.com https://fonts.reown.com; form-action 'self'; frame-src https: http:";
function baseHeaders(extra) {
return Object.assign({ 'Content-Security-Policy': CSP, 'X-Content-Type-Options': 'nosniff',
'Referrer-Policy': 'strict-origin-when-cross-origin' }, extra || {});
@@ -4006,7 +4006,7 @@ const server = http.createServer(async (req, res) => {
const sg = siteinvite.verify(req.headers, raw); if (!sg.body) return json(res, sg.status, { error: sg.error });
const op = p.slice('/api/partner/invite/'.length);
if (!['eligible', 'send', 'code'].includes(op)) return json(res, 404, { error: 'unknown op' });
const r = await siteinvite.handle(op, sg.body);
const r = await siteinvite.handle(op, sg.body, sg.site); // sg.site = the site whose own secret signed the call (Podcast Commission Stack: SITE_INVITE_SECRET_PCS, code only, 2026-11-25)
return json(res, r.error ? 400 : 200, r);
}
// -- watch-to-earn videos played on another network site (Social Tube, Marty 2026-11-22: "a member watching on Social Tube earns the same