Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

第 31 章 TrafficScript

目录

31.1. X-Forwarded-For

31.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