Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/crawl.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export function createCrawlGate(env = process.env) {
coinpay: { apiKey },
payTo,
contact: 'mailto:anthony@profullstack.com',
openPaths: ['/healthz', '/llms.txt', '/install.sh', '/install', '/commands.json', '/blog/rss.xml', '/blog/feed.xml'],
openPaths: ['/healthz', '/llms.txt', '/install.sh', '/install', '/commands.json', '/blog/rss.xml', '/blog/feed.xml',
// The legal pages: a connector directory's review crawler must read them.
'/privacy', '/terms'],
});
}

Expand Down
8 changes: 8 additions & 0 deletions test/crawl.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ test('a browser and the health check are not charged', async () => {
assert.equal((await get('/', CHROME)).status, 200);
assert.equal((await get('/healthz', { 'user-agent': GPT })).status, 200);
});

test('legal pages are open to crawlers and browsers alike', async () => {
const CLAUDEBOT = 'Mozilla/5.0 (compatible; ClaudeBot/1.0; +claudebot@anthropic.com)';
for (const path of ['/privacy', '/terms']) {
for (const ua of [GPT, CLAUDEBOT]) assert.equal((await get(path, { 'user-agent': ua })).status, 200, `${path} ${ua}`);
assert.equal((await get(path, CHROME)).status, 200);
}
});
Loading