Fix: Add trust proxy setting for Caddy reverse proxy

- Added app.set('trust proxy', true) to backend configuration
- Resolves rate limiting errors when behind Caddy reverse proxy
- Fixes document upload failures caused by X-Forwarded-For header issues
This commit is contained in:
TheMaddax 2025-06-25 15:26:40 -05:00
parent facc7fb55c
commit c2c516248e

View file

@ -23,6 +23,9 @@ dotenv.config();
const app = express();
const PORT = process.env.PORT || 3001;
// Trust proxy when behind reverse proxy (Caddy)
app.set('trust proxy', true);
// Initialize Prisma client
export const prisma = new PrismaClient({
log: ['query', 'info', 'warn', 'error'],