diff --git a/index.php b/index.php index 3f9fcabc52..3321ace8fa 100644 --- a/index.php +++ b/index.php @@ -86,6 +86,9 @@ if (isset($_GET['route']) || isset($_POST['route'])) { require_once ROOT_PATH . 'libraries/entry_points/database/triggers.php'; }); }); + $routes->addRoute(['GET', 'POST'], '/export', function () { + require_once ROOT_PATH . 'libraries/entry_points/export.php'; + }); $routes->addGroup('/server', function (RouteCollector $routes) { $routes->addRoute(['GET', 'POST'], '/binlog', function () { require_once ROOT_PATH . 'libraries/entry_points/server/binlog.php'; @@ -256,7 +259,6 @@ unset($drops, $each_drop); */ $target_blacklist = [ 'import.php', - 'export.php', ]; // If we have a valid target, let's load that script instead diff --git a/js/export.js b/js/export.js index 733c6cd468..6f0b63018e 100644 --- a/js/export.js +++ b/js/export.js @@ -728,14 +728,13 @@ Export.checkTimeOut = function (timeLimit) { } // margin of one second to avoid race condition to set/access session variable limit = limit + 1; - var href = 'export.php'; var params = { 'ajax_request' : true, 'check_time_out' : true }; clearTimeout(timeOut); timeOut = setTimeout(function () { - $.get(href, params, function (data) { + $.get('index.php?route=/export', params, function (data) { if (data.message === 'timeout') { Functions.ajaxShowMessage( '