- Timestamp:
- Mar 8, 2013, 2:34:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/dvodist/www-util/ippdata.page.mkd
r35275 r35280 7 7 // if we come in directly, the top-level directory should be /dvodist 8 8 // if we come in from the ippops1 proxy, we need to set the root to / 9 $ ifaProxy = "128.171.227.208";9 $realHost = "ipp.ifa.hawaii.edu"; 10 10 11 // is the request coming from our proxY? 12 $fromProxy = $_SERVER['HTTP_X_FORWARDED_FOR'] && ($_SERVER['REMOTE_ADDR'] == $ifaProxy); 13 if ($fromProxy) { 11 // is the request coming from our proxy? 12 if ($_SERVER['SERVER_NAME'] == $realHost) { 14 13 $rootdir = "@ROOTWWW@"; 15 } else {14 } else { 16 15 $rootdir = "@ROOTWWW@@ROOTDIR@"; 17 }16 } 18 17 19 18 menu("$utils/ippdata.menu.dat", 'Pan-STARRS 1 Data Distribution Server', $rootdir, "$rootdir/ipp.css", '', ''); … … 24 23 menu_end(); 25 24 ?> 26 27 // generic proxy detection28 // if ( $_SERVER['HTTP_X_FORWARDED_FOR']29 // || $_SERVER['HTTP_X_FORWARDED']30 // || $_SERVER['HTTP_FORWARDED_FOR']31 // || $_SERVER['HTTP_CLIENT_IP']32 // || $_SERVER['HTTP_VIA']33 // || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))34 // || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30))35 // {36 // exit('Proxy detected');37 // }38 39 // list server info:40 // $varlist = array ('SCRIPT_NAME', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_VIA', 'REMOTE_ADDR');41 //42 // foreach ($varlist as $name) {43 // echo "$name : $_SERVER[$name]<br>\n";44 // }45 //46 // echo "get list<br>\n";47 // foreach ($_GET as $key => $value) {48 // echo "$key : $value<br>\n";49 // }50
Note:
See TracChangeset
for help on using the changeset viewer.
