can add images to forum posts and comments

This commit is contained in:
jackiettran
2025-11-11 23:32:03 -05:00
parent b045fbeb01
commit 105f257c5f
13 changed files with 383 additions and 78 deletions

View File

@@ -131,8 +131,12 @@ app.use(
})
);
// Serve static files from uploads directory
app.use("/uploads", express.static(path.join(__dirname, "uploads")));
// Serve static files from uploads directory with CORS headers
app.use(
"/uploads",
helmet.crossOriginResourcePolicy({ policy: "cross-origin" }),
express.static(path.join(__dirname, "uploads"))
);
// Public routes (no alpha access required)
app.use("/api/alpha", alphaRoutes);