mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: X-Reload & X-ControllerURL didn't support absolute URLs (fixes #4119)
This commit is contained in:
parent
4c165d42fe
commit
120b983ad6
@ -633,8 +633,11 @@ jQuery.noConflict();
|
||||
|
||||
// Support a full reload
|
||||
if(xhr.getResponseHeader('X-Reload') && xhr.getResponseHeader('X-ControllerURL')) {
|
||||
document.location.href = $('base').attr('href').replace(/\/*$/, '')
|
||||
+ '/' + xhr.getResponseHeader('X-ControllerURL');
|
||||
var baseUrl = $('base').attr('href'),
|
||||
rawURL = xhr.getResponseHeader('X-ControllerURL'),
|
||||
url = $.path.isAbsoluteUrl(rawURL) ? rawURL : $.path.makeUrlAbsolute(rawURL, baseUrl);
|
||||
|
||||
document.location.href = url;
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user