diff --git a/public/index.html b/public/index.html index 231ddec..240e4a7 100644 --- a/public/index.html +++ b/public/index.html @@ -5,6 +5,7 @@ setkernel live: four AI engineers at work + diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/test/page.test.mjs b/test/page.test.mjs index 99b5e05..d4a1623 100644 --- a/test/page.test.mjs +++ b/test/page.test.mjs @@ -32,7 +32,9 @@ test("CSP allows scripts, styles and fonts only from the page itself", () => { test("index.html and style.css fetch nothing from another host", () => { const html = read("index.html"); + assert.match(html, //, "the main page names its canonical URL"); for (const m of html.matchAll(/<(link|script|img|iframe)\b[^>]*>/gi)) { + if (/rel="canonical"/.test(m[0])) continue; // names this page's URL; fetches nothing assert.doesNotMatch(m[0], /(src|href)\s*=\s*["']?(https?:)?\/\//i, m[0]); } const css = read("style.css");