my application hosted in ALB and waf enabled, getting 403 on all the ajax request which is having the word "anything space on*". for example if i have a textfield with the input like "test one", when the same data is passing to the ajax data getting 403 error. when i am using stringify the same data, the error is not coming.
var value = "test one"; //inputFieldText
$ajax({"url":"url",data:value}) // data from input field, if having space on* failed.
$ajax({"url":"url",data:JSON.stringify(value)}) // if same data is stringified then working fine.
if stringify is the only way, then i have 1000 of ajax request in my application, Any work around or suggestions ? please advice.
you can simply override jQuery $ajax and apply
JSON.stringify()
there:or you can extend the $ajax function and apply your own logic in extended version:
this will help implement any custom logic once and for all.