Update file.routes.js

This commit is contained in:
Daniël 2024-06-09 14:30:27 +02:00 committed by GitHub
parent fe991ae2f7
commit 9e655e86b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;