Explicitly set contentType to avoid promotion to jsonp

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-11-18 12:53:44 +01:00
parent 69f838f7a6
commit bc1c6bc117
9 changed files with 17 additions and 5 deletions

View File

@@ -346,7 +346,7 @@ function setAppPassword() {
dataType: "json",
processData: false,
data: JSON.stringify({ config: { webserver: { api: { app_pwhash: apppwhash } } } }),
contentType: "application/json",
contentType: "application/json; charset=utf-8",
})
.done(function () {
$("#modal-apppw").modal("hide");
@@ -399,7 +399,7 @@ function setTOTPSecret(secret) {
dataType: "json",
processData: false,
data: JSON.stringify({ config: { webserver: { api: { totp_secret: secret } } } }),
contentType: "application/json",
contentType: "application/json; charset=utf-8",
})
.done(function () {
$("#button-enable-totp").addClass("hidden");