File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -472,15 +472,22 @@ export function createServer(options = {}) {
472472
473473 // Pod creation endpoint with rate limiting
474474 // Limit: 1 pod per IP per day to prevent resource exhaustion and namespace squatting
475- fastify . post ( '/.pods' , {
476- config : {
477- rateLimit : {
478- max : 1 ,
479- timeWindow : '1 day' ,
480- keyGenerator : ( request ) => request . ip
475+ // Disabled in single-user mode
476+ if ( singleUser ) {
477+ fastify . post ( '/.pods' , async ( request , reply ) => {
478+ return reply . code ( 403 ) . send ( { error : 'Pod creation disabled in single-user mode' } ) ;
479+ } ) ;
480+ } else {
481+ fastify . post ( '/.pods' , {
482+ config : {
483+ rateLimit : {
484+ max : 1 ,
485+ timeWindow : '1 day' ,
486+ keyGenerator : ( request ) => request . ip
487+ }
481488 }
482- }
483- } , handleCreatePod ) ;
489+ } , handleCreatePod ) ;
490+ }
484491
485492 // Mashlib CDN mode: redirect chunk requests to CDN
486493 if ( mashlibEnabled && mashlibCdn ) {
You can’t perform that action at this time.
0 commit comments