business: DocFast deployed on Hetzner CAX11 (167.235.156.214)

This commit is contained in:
Hoid 2026-02-14 13:46:50 +00:00
parent 37094c8945
commit a1c86b0ebc
13 changed files with 181 additions and 111 deletions

View file

@ -1,8 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.authMiddleware = authMiddleware;
const API_KEYS = new Set((process.env.API_KEYS || "test-key-123").split(",").map((k) => k.trim()));
function authMiddleware(req, res, next) {
export function authMiddleware(req, res, next) {
const header = req.headers.authorization;
if (!header?.startsWith("Bearer ")) {
res.status(401).json({ error: "Missing API key. Use: Authorization: Bearer <key>" });