Convert every POST off multipart — 21 call sites across 7 tabs
A multipart POST to the plugin API hangs and never completes on this host: no status code, and no server-side trace of any kind. The correlation was exact — every page using URLSearchParams worked, every page using FormData hung, which is why scheduler and partnership appeared fine while docker, rsync, settings, auth, arrs, fallback and monitor did not. URLSearchParams has the same append API and fetch sets the urlencoded content type for it, so each site is a one-token change with the payload logic untouched.
This commit is contained in:
@@ -398,7 +398,7 @@ function vvFbLoad() {
|
||||
window.vvFbToggle = function(track, key) {
|
||||
const on = !track.classList.contains('on');
|
||||
track.classList.toggle('on', on);
|
||||
const fd = new FormData();
|
||||
const fd = new URLSearchParams();
|
||||
fd.append('id', 'fallback');
|
||||
fd.append('changes', JSON.stringify([{ file: 'master.conf', key, value: on ? 'true' : 'false', type: 'scalar' }]));
|
||||
fetch('/plugins/varaverk/api/confform.php', { method: 'POST', body: fd })
|
||||
@@ -423,7 +423,7 @@ window.vvFbSaveSettings = function() {
|
||||
}
|
||||
|
||||
btn.disabled = true; btn.textContent = 'Saving…'; fb.textContent = '';
|
||||
const fd = new FormData();
|
||||
const fd = new URLSearchParams();
|
||||
fd.append('id', 'fallback');
|
||||
fd.append('changes', JSON.stringify([
|
||||
{ file: 'master.conf', key: 'FALLBACK_CHECK_INTERVAL', value: String(interval), type: 'scalar' },
|
||||
|
||||
Reference in New Issue
Block a user