Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(backend): prevent serving dotfiles as static assets

johaven8ab8d30828af
diff --git a/backend/src/app.bootstrap.ts b/backend/src/app.bootstrap.ts
index d34d8318..2b57e532 100644
--- a/backend/src/app.bootstrap.ts
+++ b/backend/src/app.bootstrap.ts
@@ -57,7 +57,7 @@ export async function appBootstrap(): Promise<NestFastifyApplication> {
app.useGlobalPipes(new StandardSchemaValidationPipe())
/* STATIC */
- app.useStaticAssets({ root: STATIC_PATH, prefixAvoidTrailingSlash: true })
+ app.useStaticAssets({ root: STATIC_PATH, prefixAvoidTrailingSlash: true, dotfiles: 'ignore' })
/* SECURITY */
await app.register(fastifyHelmet, {