mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 12:48:29 +00:00
Add "processData: false" to all JSON data we send
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -119,6 +119,8 @@ function piholeChange(action, duration) {
|
||||
$.ajax({
|
||||
url: "/api/dns/blocking",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
blocking: action === "enable",
|
||||
timer: parseInt(duration, 10) > 0 ? parseInt(duration, 10) : null,
|
||||
|
||||
@@ -516,6 +516,7 @@ function addAdlist(event) {
|
||||
url: "/api/lists",
|
||||
method: "post",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({ address: address, comment: comment, type: type }),
|
||||
success: function () {
|
||||
utils.enableAll();
|
||||
@@ -582,6 +583,7 @@ function editAdlist() {
|
||||
url: "/api/lists/" + encodeURIComponent(addressDecoded),
|
||||
method: "put",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
groups: groups,
|
||||
comment: comment,
|
||||
|
||||
@@ -440,6 +440,7 @@ function addClient() {
|
||||
url: "/api/clients",
|
||||
method: "post",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({ client: ip, comment: comment }),
|
||||
success: function () {
|
||||
utils.enableAll();
|
||||
@@ -495,6 +496,7 @@ function editClient() {
|
||||
url: "/api/clients/" + encodeURIComponent(clientDecoded),
|
||||
method: "put",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
client: client,
|
||||
groups: groups,
|
||||
|
||||
@@ -527,6 +527,7 @@ function addDomain() {
|
||||
url: "/api/domains/" + type + "/" + kind,
|
||||
method: "post",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
domain: domain,
|
||||
comment: comment,
|
||||
@@ -609,6 +610,7 @@ function editDomain() {
|
||||
url: "/api/domains/" + newTypestr + "/" + encodeURIComponent(domainDecoded),
|
||||
method: "put",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
groups: groups,
|
||||
comment: comment,
|
||||
|
||||
@@ -294,6 +294,7 @@ function addGroup() {
|
||||
url: "/api/groups",
|
||||
method: "post",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
name: name,
|
||||
comment: comment,
|
||||
@@ -360,6 +361,7 @@ function editGroup() {
|
||||
url: "/api/groups/" + oldName,
|
||||
method: "put",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
name: name,
|
||||
comment: comment,
|
||||
|
||||
@@ -60,6 +60,8 @@ function doLogin(password) {
|
||||
$.ajax({
|
||||
url: "/api/auth",
|
||||
method: "POST",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({ password: password, totp: parseInt($("#totp").val(), 10) }),
|
||||
})
|
||||
.done(function () {
|
||||
|
||||
@@ -318,6 +318,8 @@ function setTOTPSecret(secret) {
|
||||
$.ajax({
|
||||
url: "/api/config",
|
||||
type: "PATCH",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({ config: { webserver: { api: { totp_secret: secret } } } }),
|
||||
contentType: "application/json",
|
||||
})
|
||||
|
||||
@@ -290,6 +290,8 @@ $("#loggingButton").confirm({
|
||||
$.ajax({
|
||||
url: "/api/config/dns/queryLogging",
|
||||
type: "PATCH",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify(data),
|
||||
})
|
||||
.done(function (data) {
|
||||
|
||||
@@ -137,6 +137,8 @@ function saveSettings() {
|
||||
$.ajax({
|
||||
url: "/api/config",
|
||||
method: "PATCH",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({ config: settings }),
|
||||
contentType: "application/json; charset=utf-8",
|
||||
})
|
||||
|
||||
@@ -315,6 +315,7 @@ function addFromQueryLog(domain, list) {
|
||||
url: "/api/domains/" + list + "/exact",
|
||||
method: "post",
|
||||
dataType: "json",
|
||||
processData: false,
|
||||
data: JSON.stringify({
|
||||
domain: domain,
|
||||
comment: "Added from Query Log",
|
||||
|
||||
Reference in New Issue
Block a user