1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2025-12-13 18:06: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:
Phoenix Eve Aspacio
2024-12-11 10:06:10 +08:00
committed by GitHub
parent f065842402
commit d09e4ff020

View File

@@ -179,9 +179,8 @@ $(document).ready(function() {
// Get script_data textarea content from form the button was clicked in
var script = $('textarea[name="script_data"]', $(this).parents('form:first')).val();
$.ajax({
dataType: 'json',
url: "/inc/ajax/sieve_validation.php",
type: "get",
type: "post",
data: { script: script },
complete: function(data) {
var response = (data.responseText);