Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

第 40 章 TrafficScript

目錄

40.1. X-Forwarded-For

40.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());
}