mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Fix SS-2015-010
This commit is contained in:
parent
098be055a9
commit
ee9bddb808
@ -796,14 +796,10 @@ class Director implements TemplateGlobalProvider {
|
|||||||
* @param string $destURL - The URL to redirect to
|
* @param string $destURL - The URL to redirect to
|
||||||
*/
|
*/
|
||||||
protected static function force_redirect($destURL) {
|
protected static function force_redirect($destURL) {
|
||||||
$response = new SS_HTTPResponse(
|
$response = new SS_HTTPResponse();
|
||||||
"<h1>Your browser is not accepting header redirects</h1>".
|
$response->redirect($destURL, 301);
|
||||||
"<p>Please <a href=\"$destURL\">click here</a>",
|
|
||||||
301
|
|
||||||
);
|
|
||||||
|
|
||||||
HTTP::add_cache_headers($response);
|
HTTP::add_cache_headers($response);
|
||||||
$response->addHeader('Location', $destURL);
|
|
||||||
|
|
||||||
// TODO: Use an exception - ATM we can be called from _config.php, before Director#handleRequest's try block
|
// TODO: Use an exception - ATM we can be called from _config.php, before Director#handleRequest's try block
|
||||||
$response->output();
|
$response->output();
|
||||||
|
Loading…
Reference in New Issue
Block a user