mirror of
https://github.com/filecoffee/filehost.git
synced 2024-11-13 19:49:56 +01:00
Update file.routes.js
This commit is contained in:
parent
fe991ae2f7
commit
9e655e86b1
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ const { uploadFile, getFile } = require("../controllers/file.controller");
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
const apiKeys = process.env.API_KEYS.split(",");
|
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 authenticate = (req, res, next) => {
|
||||||
const apiKey = req.headers["x-api-key"] || req.query.api;
|
const apiKey = req.headers["x-api-key"] || req.query.api;
|
||||||
|
|
Loading…
Reference in a new issue