commit 1b610a05aad34dceb22c537df77ac04383b27884 parent 6d4c9ea21342dcf547ddfeccd43a6371a1b6f931 Author: Florian Dold <dold@inria.fr> Date: Fri, 25 Dec 2015 21:44:20 +0100 Fix fulfillment URL. Diffstat:
| M | src/frontend/pay.php | | | 11 | ++--------- |
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/frontend/pay.php b/src/frontend/pay.php @@ -52,8 +52,7 @@ if (isset($_SESSION['payment_ok']) && $_SESSION['payment_ok'] == true) { $_SESSION['payment_ok'] = true; http_response_code (301); - //$url = (new http\URL("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]")) - $url = (new http\URL("http://$_SERVER[HTTP_HOST]")) + $url = (new http\URL($_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) ->mod(array ("path" => "fulfillment.php"), http\Url::JOIN_PATH); header("Location: $url"); die(); @@ -133,13 +132,7 @@ else { $_SESSION['payment_ok'] = true; http_response_code (301); - /** - * WARNING: the "shop site" is '"http://".$_SERVER["HTTP_HOST"]' - * So do not attach $_SERVER["REQUEST_URI"] before proxying requests - * to the backend - */ - //$url = (new http\URL("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]")) - $url = (new http\URL("http://$_SERVER[HTTP_HOST]")) + $url = (new http\URL($_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'])) ->mod(array ("path" => "fulfillment.php"), http\Url::JOIN_PATH); header("Location: $url"); die();