File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -143,9 +143,17 @@ In this case, you'll need to - *very carefully* - trust *all* proxies.
143143       framework : 
144144           #  ... 
145145           #  trust *all* requests (the 'REMOTE_ADDR' string is replaced at 
146-            #  run time  by $_SERVER['REMOTE_ADDR']) 
146+            #  runtime  by $_SERVER['REMOTE_ADDR']) 
147147           trusted_proxies : ' 127.0.0.1,REMOTE_ADDR'  
148148
149+            #  you can also use the 'PRIVATE_SUBNETS' string, which is replaced at 
150+            #  runtime by the IpUtils::PRIVATE_SUBNETS constant 
151+            #  trusted_proxies: '127.0.0.1,PRIVATE_SUBNETS' 
152+ 
153+ versionadded :: 7.2 
154+ 
155+     The support for the ``'PRIVATE_SUBNETS' `` string was introduced in Symfony 7.2.
156+ 
149157That's it! It's critical that you prevent traffic from all non-trusted sources.
150158If you allow outside traffic, they could "spoof" their true IP address and
151159other information.
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments