Summary
The cloudflare, netlify and vercel adapters test skip prefixes with a bare startsWith, so a prefix over-matches any path that merely starts with the same characters. With the default DEFAULT_SKIP_PREFIXES = ["/admin", "/api/", "/_"], a real page like /administrator (or /admins, /admin-guide) matches /admin and is silently skipped: no content negotiation, no markdown twin, no Link header.
Where
// packages/cloudflare/src/worker.ts, packages/netlify/src/worker.ts, packages/vercel/src/middleware.ts
return prefixes.some((p) => pathname.startsWith(p));
The deno and fastly adapters already use a boundary-aware check (packages/deno/src/handler.ts):
return prefixes.some((p) => {
if (pathname === p) return true;
if (p.endsWith("/")) return pathname.startsWith(p);
return pathname.startsWith(p + "/");
});
Reproduction
import { createAEOWorker } from "@dualmark/cloudflare";
// ASSETS has /administrator.md
// GET /administrator with a bot UA
// actual: text/html (skipped, twin ignored)
// expected: text/markdown (negotiated)
Proposed fix
Adopt the same boundary-aware shouldSkip used by deno/fastly in cloudflare, netlify and vercel. A prefix matches the exact path or a prefix/ subpath; a prefix already ending in / keeps matching via startsWith; asset paths under /_ remain covered by the extension list. PR incoming.
Summary
The cloudflare, netlify and vercel adapters test skip prefixes with a bare
startsWith, so a prefix over-matches any path that merely starts with the same characters. With the defaultDEFAULT_SKIP_PREFIXES = ["/admin", "/api/", "/_"], a real page like/administrator(or/admins,/admin-guide) matches/adminand is silently skipped: no content negotiation, no markdown twin, no Link header.Where
The deno and fastly adapters already use a boundary-aware check (
packages/deno/src/handler.ts):Reproduction
Proposed fix
Adopt the same boundary-aware
shouldSkipused by deno/fastly in cloudflare, netlify and vercel. A prefix matches the exact path or aprefix/subpath; a prefix already ending in/keeps matching viastartsWith; asset paths under/_remain covered by the extension list. PR incoming.