Skip to content

Commit 6a1c6a2

Browse files
authored
fix: remove unauthenticated public upload access (#350)
1 parent 8421d23 commit 6a1c6a2

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

apps/backend/src/app.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,8 @@ export async function buildApp():Promise<FastifyInstance> {
7676
timeWindow: '1 minute',
7777
});
7878

79-
// Static file serving for uploads
80-
await app.register(fastifyStatic, {
81-
root: path.join(__dirname, '..', 'uploads'),
82-
prefix: '/uploads/',
83-
decorateReply: false,
84-
});
79+
// Files must be served through authenticated route handlers
80+
// with ownership validation.
8581

8682
// ─── Database & Cache Plugins ───
8783
if (process.env.NODE_ENV !== 'test') {

0 commit comments

Comments
 (0)