Skip to content

Commit 7c3a47e

Browse files
committed
fix(server): enable trust proxy and optimize env loading
- Added `app.set('trust proxy', 1)` to support rate-limiting behind Nginx.
1 parent 82a4489 commit 7c3a47e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

backend/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const uploadRoute = require('./routes/upload');
2121
const batchConvertRoute = require('./routes/batchConvert');
2222

2323
const app = express();
24+
app.set('trust proxy', 1);
2425
const PORT = process.env.PORT || 5000;
2526

2627
app.use(corsMiddleware);

0 commit comments

Comments
 (0)