1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-05 15:57:23 +01:00

rewrite the DNS API to permit setting multiple records of the same type on the same domain

e.g. multiple TXT records

fixes #333
This commit is contained in:
Joshua Tauberer
2015-05-03 13:40:52 +00:00
parent 9f1d633ae4
commit 1e9c587b92
4 changed files with 105 additions and 48 deletions

View File

@@ -337,6 +337,11 @@ function api(url, method, data, callback, callback_error) {
method: method,
cache: false,
data: data,
// the custom DNS api sends raw POST/PUT bodies --- prevent URL-encoding
processData: typeof data != "string",
mimeType: typeof data == "string" ? "text/plain; charset=ascii" : null,
beforeSend: function(xhr) {
// We don't store user credentials in a cookie to avoid the hassle of CSRF
// attacks. The Authorization header only gets set in our AJAX calls triggered