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:
parent
facc7fb55c
commit
c2c516248e
1 changed files with 3 additions and 0 deletions
|
|
@ -23,6 +23,9 @@ dotenv.config();
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 3001;
|
const PORT = process.env.PORT || 3001;
|
||||||
|
|
||||||
|
// Trust proxy when behind reverse proxy (Caddy)
|
||||||
|
app.set('trust proxy', true);
|
||||||
|
|
||||||
// Initialize Prisma client
|
// Initialize Prisma client
|
||||||
export const prisma = new PrismaClient({
|
export const prisma = new PrismaClient({
|
||||||
log: ['query', 'info', 'warn', 'error'],
|
log: ['query', 'info', 'warn', 'error'],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue