AJAX 403 denied while executing ajax request

The website initiates an ajax request but always gets a 403 return error for all browsers.

I tested it by initiating the same call in the firebug console, it works (status: 200)

What problem can be deduced?

jQuery.ajax({ url: "cart_ajax_get_product.php", data: {id: 355, qty: 1}, success: function(data) { }); }, error: function(err) { } }); 

thanks

+4
source share
2 answers

Perhaps the problem is with apache mod_security. Try ajax GET instead of POST :

 jQuery.ajax({ type:"GET", url: "cart_ajax_get_product.php", data: {id: 355, qty: 1}, success: function(data) { }); }, error: function(err) { } }); 

Or if this does not help ...

You can try to set these parameters on the .htaccess server or configure them elsewhere:

 SecFilterScanPOST Off SecFilterEngine Off 
+1
source
 jQuery.ajax({ url: "cart_ajax_get_product.php", data: {id: 355, qty: 1}, success: function(data) { } error: function(err) { } }); 
0
source

All Articles