Bugfix path selection for reverse proxy

This commit is contained in:
Ozzie Isaacs 2023-03-26 14:31:19 +02:00
parent 7d26e6fc85
commit 6c8ffb3e7e
2 changed files with 5 additions and 6 deletions

View File

@ -304,7 +304,7 @@ $(function() {
} }
function fillFileTable(path, type, folder, filt) { function fillFileTable(path, type, folder, filt) {
var request_path = "/../../ajax/pathchooser/"; var request_path = "/ajax/pathchooser/";
$.ajax({ $.ajax({
dataType: "json", dataType: "json",
data: { data: {
@ -673,7 +673,7 @@ $(function() {
$.ajax({ $.ajax({
method:"post", method:"post",
dataType: "json", dataType: "json",
url: getPath() + "/../../ajax/simulatedbchange", url: getPath() + "/ajax/simulatedbchange",
data: {config_calibre_dir: $("#config_calibre_dir").val(), csrf_token: $("input[name='csrf_token']").val()}, data: {config_calibre_dir: $("#config_calibre_dir").val(), csrf_token: $("input[name='csrf_token']").val()},
success: function success(data) { success: function success(data) {
if ( data.change ) { if ( data.change ) {
@ -700,8 +700,7 @@ $(function() {
e.stopPropagation(); e.stopPropagation();
this.blur(); this.blur();
window.scrollTo({top: 0, behavior: 'smooth'}); window.scrollTo({top: 0, behavior: 'smooth'});
var request_path = "/../../admin/ajaxconfig"; var request_path = "/admin/ajaxconfig";
var loader = "/../..";
$("#flash_success").remove(); $("#flash_success").remove();
$("#flash_danger").remove(); $("#flash_danger").remove();
$.post(getPath() + request_path, $(this).closest("form").serialize(), function(data) { $.post(getPath() + request_path, $(this).closest("form").serialize(), function(data) {
@ -710,7 +709,7 @@ $(function() {
$("#spinning_success").show(); $("#spinning_success").show();
var rebootInterval = setInterval(function(){ var rebootInterval = setInterval(function(){
$.get({ $.get({
url:getPath() + "/../../admin/alive", url:getPath() + "/admin/alive",
success: function (d, statusText, xhr) { success: function (d, statusText, xhr) {
if (xhr.status < 400) { if (xhr.status < 400) {
$("#spinning_success").hide(); $("#spinning_success").hide();

View File

@ -49,7 +49,7 @@ $(function() {
method: "post", method: "post",
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
dataType: "json", dataType: "json",
url: getPath() + "/../ajax/canceltask", url: getPath() + "/ajax/canceltask",
data: JSON.stringify({"task_id": taskId}), data: JSON.stringify({"task_id": taskId}),
}); });
}); });