File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ export default withAuth(config({
8383 credentials : true ,
8484 } ,
8585 extendExpressApp : ( app , context ) => {
86+ // Trust first proxy (Caddy) to get real client IP from X-Forwarded-For
87+ app . set ( 'trust proxy' , 1 ) ;
88+
8689 // Parse cookies before any routes
8790 app . use ( cookieParser ( ) ) ;
8891
@@ -99,7 +102,7 @@ export default withAuth(config({
99102 // Rate limiting
100103 const apiLimiter = rateLimit ( {
101104 windowMs : 15 * 60 * 1000 , // 15 minutes
102- max : 500 , // 500 requests per 15 min window
105+ max : 100 , // 100 requests per 15 min window
103106 standardHeaders : true ,
104107 legacyHeaders : false ,
105108 message : { error : 'Too many requests, please try again later.' } ,
@@ -116,7 +119,7 @@ export default withAuth(config({
116119
117120 const uploadLimiter = rateLimit ( {
118121 windowMs : 60 * 60 * 1000 , // 1 hour
119- max : 200 , // 200 uploads per hour
122+ max : 30 , // 30 uploads per hour
120123 standardHeaders : true ,
121124 legacyHeaders : false ,
122125 message : { error : 'Upload limit reached. Please try again later.' } ,
You can’t perform that action at this time.
0 commit comments