diff --git a/routes/file.routes.js b/routes/file.routes.js index 8893c0d..08a2cee 100644 --- a/routes/file.routes.js +++ b/routes/file.routes.js @@ -4,7 +4,7 @@ const { uploadFile, getFile } = require("../controllers/file.controller"); const router = express.Router(); const apiKeys = process.env.API_KEYS.split(","); -const allowPublicUploads = process.env.ALLOW_PUBLIC; +const allowPublicUploads = process.env.ALLOW_PUBLIC ?? false; const authenticate = (req, res, next) => { const apiKey = req.headers["x-api-key"] || req.query.api;