mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-13 09:56:01 +00:00
Convert AJAX to POST request
This AJAX request sends form data in $_GET request query. This is problematic and unreliable when validating superrrr loooooong conditions, especially in environments that use reverse-proxy. Been having this problem and this PR solves it. :)
This commit is contained in:
committed by
GitHub
parent
f065842402
commit
d09e4ff020
@@ -179,9 +179,8 @@ $(document).ready(function() {
|
|||||||
// Get script_data textarea content from form the button was clicked in
|
// Get script_data textarea content from form the button was clicked in
|
||||||
var script = $('textarea[name="script_data"]', $(this).parents('form:first')).val();
|
var script = $('textarea[name="script_data"]', $(this).parents('form:first')).val();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
dataType: 'json',
|
|
||||||
url: "/inc/ajax/sieve_validation.php",
|
url: "/inc/ajax/sieve_validation.php",
|
||||||
type: "get",
|
type: "post",
|
||||||
data: { script: script },
|
data: { script: script },
|
||||||
complete: function(data) {
|
complete: function(data) {
|
||||||
var response = (data.responseText);
|
var response = (data.responseText);
|
||||||
|
|||||||
Reference in New Issue
Block a user