mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Fix for each module have its own XHR library
https://github.com/webmin/webmin/pull/1917#discussion_r1222408167
This commit is contained in:
@@ -2922,7 +2922,7 @@ my $iframe_body = <<EOF;
|
||||
imgPresrc.forEach(function(img) {
|
||||
(async function() {
|
||||
try {
|
||||
const response = await fetch("$webprefix/XHR.cgi?action=fetch&type=download&subtype=blob&url=" + encodeURIComponent(img.dataset.presrc) + "");
|
||||
const response = await fetch("$webprefix/$module_name/xhr.cgi?action=fetch&type=download&subtype=blob&url=" + encodeURIComponent(img.dataset.presrc) + "");
|
||||
response.blob().then(function(blob) {
|
||||
try {
|
||||
const urlBlob = URL.createObjectURL(blob);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/local/bin/perl
|
||||
# A pile of XHR related routines
|
||||
# XHR related routines
|
||||
|
||||
use strict;
|
||||
|
||||
@@ -10,6 +10,6 @@ use WebminCore;
|
||||
&init_config();
|
||||
&ReadParse();
|
||||
&switch_to_remote_user();
|
||||
do "$root_directory/XHR-lib.pl";
|
||||
|
||||
do "./xhr-lib.pl";
|
||||
xhr();
|
||||
Reference in New Issue
Block a user