mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
fixing proxy url
This commit is contained in:
parent
7cd4169768
commit
9f32f8115d
27
redirect.php
27
redirect.php
@ -1,17 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - save redirect script *
|
||||
* idea by: Jason Wies <jason@xc.net> *
|
||||
* doing and adding to cvs: Lars Kneschke <lkneschke@linux-at-work.de> *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**
|
||||
* EGroupware save redirect script
|
||||
*
|
||||
* idea by: Jason Wies
|
||||
* doing and adding to cvs: Lars Kneschke
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
use EGroupware\Api;
|
||||
|
||||
/*
|
||||
Use this script when you want to link to a external url.
|
||||
@ -47,8 +45,8 @@
|
||||
$valid_referer = array();
|
||||
$path = preg_replace('/\/[^\/]*$/','',$_SERVER['PHP_SELF']) . '/';
|
||||
array_push($valid_referer, $path);
|
||||
array_push($valid_referer, ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_ADDR'] . $path);
|
||||
array_push($valid_referer, ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . $path);
|
||||
array_push($valid_referer, Api\Header\Http::schema() . '//' . $_SERVER['SERVER_ADDR'] . $path);
|
||||
array_push($valid_referer, Api\Framework::getUrl($path));
|
||||
|
||||
$referrer = trim($_SERVER['HTTP_REFERER']);
|
||||
if ((!isset($_SERVER['HTTP_REFERER'])) || (empty($referrer)))
|
||||
@ -92,4 +90,3 @@
|
||||
{
|
||||
echo "Error redirecting.";
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user