FO: Fix #PSCFV-5800 don't send any cookie on canonical redirection

This commit is contained in:
Rémi Gaillard
2012-11-23 15:44:23 +01:00
parent 67be4309d2
commit f5d4fbccfd
2 changed files with 12 additions and 1 deletions

View File

@@ -657,6 +657,9 @@ class FrontControllerCore extends Controller
else
$final_url = preg_replace('/^([^?]*)?.*$/', '$1', $canonical_url);
// Don't send any cookie
Context::getContext()->cookie->disallowWriting();
if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_ && $_SERVER['REQUEST_URI'] != __PS_BASE_URI__)
die('[Debug] This page has moved<br />Please use the following URL instead: <a href="'.$final_url.'">'.$final_url.'</a>');