mirror of
https://github.com/pi-hole/web.git
synced 2026-04-20 00:39:52 +01:00
Explicitly set contentType to avoid promotion to jsonp
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user