Skip to content

Commit f973afe

Browse files
committed
fix: potential XSS entry
1 parent 29702d2 commit f973afe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/docs/app/llms.txt/route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Thanks to better-auth for the code
22

3-
import * as fs from 'node:fs/promises';
3+
import fs from 'node:fs/promises';
44
import fg from 'fast-glob';
55
import { remarkInstall } from 'fumadocs-docgen';
66
import matter from 'gray-matter';
@@ -28,7 +28,9 @@ ${processed}`;
2828

2929
const scanned = await Promise.all(scan);
3030

31-
return new Response(scanned.join('\n\n'));
31+
return new Response(scanned.join('\n\n'), {
32+
headers: { 'Content-Type': 'text/plain; charset=utf-8' },
33+
});
3234
}
3335

3436
async function processContent(content: string): Promise<string> {

0 commit comments

Comments
 (0)