IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 8, 2013, 2:34:44 PM (13 years ago)
Author:
eugene
Message:

updates to the ippdata pages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/dvodist/www-util/ippdata.page.mkd

    r35275 r35280  
    77// if we come in directly, the top-level directory should be /dvodist
    88// 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";
    1010
    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?
     12if ($_SERVER['SERVER_NAME'] == $realHost) {
    1413  $rootdir = "@ROOTWWW@";
    15  } else {
     14} else {
    1615  $rootdir = "@ROOTWWW@@ROOTDIR@";
    17  }
     16}
    1817
    1918menu("$utils/ippdata.menu.dat", 'Pan-STARRS 1 Data Distribution Server', $rootdir, "$rootdir/ipp.css", '', '');
     
    2423menu_end();
    2524?>
    26 
    27 // generic proxy detection
    28 // 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.