Home | Mirror | Search

第 30 章 TrafficScript

目錄

1. X-Forwarded-For

1. X-Forwarded-For

if( !http.headerExists( "X-Forwarded-For" ) ) {
   http.setHeader("X-Forwarded-For",request.getRemoteIP());
}else{
 $current = http.getHeader("X-Forwarded-For");
   http.setHeader("X-Forwarded-For",$current . "," .  request.getRemoteIP());
}
		
comments powered by Disqus