Site host from one module: host.js exports SITE_HOST/SITE_URL and every module, email, Telegram post, QR, ad click URL and OG tag reads it (no more hard-coded test hostname); public pages carry {{SITE_URL}} filled at serve time; frame check carries the curtain pass for our own hosts so a test ad can point at a spin link; stale IAP sitemap removed

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-07 08:52:04 -05:00
parent 6da444c790
commit ad744d8c0f
29 changed files with 135 additions and 111 deletions
+4 -3
View File
@@ -1,12 +1,13 @@
// Outbound mail via SendGrid v3 (domain-authenticated linkspin-test.saasy.top).
// Outbound mail via SendGrid v3 (domain-authenticated the site host).
// Key sources: SENDGRID_KEY env, else DATA_DIR/sendgrid.key in the volume.
// No key = email sign-in stays feature-flagged off in production.
const { SITE_HOST, SITE_URL } = require('./host');
const fs = require('fs');
const path = require('path');
const https = require('https');
let DATA_DIR = null;
const FROM = { email: 'no-reply@linkspin-test.saasy.top', name: 'LinkSpin' };
const FROM = { email: 'no-reply@' + SITE_HOST, name: 'LinkSpin' };
function init(opts) { DATA_DIR = opts.dataDir; }
function key() {
@@ -46,7 +47,7 @@ function sendCode(to, code) {
return send(to, code + ' is your LinkSpin sign-in code',
'Your sign-in code is: ' + code + '\n\n'
+ 'It works for 15 minutes. If you did not request it, ignore this email.\n\n'
+ 'LinkSpin\nAdvertise and earn instantly. Locked in code, not promises.\nhttps://linkspin-test.saasy.top');
+ 'LinkSpin\nAdvertise and earn instantly. Locked in code, not promises.\n' + SITE_URL);
}
module.exports = { init, hasKey, send, sendCode };