posabsolute / jQuery-Validation-Engine

jQuery form validation plugin
http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/
2.57k stars 1.2k forks source link

X-Requested-With: XMLHttpRequest is not transmit in v3.0 #972

Closed emulsion-io closed 5 years ago

emulsion-io commented 5 years ago

Header HTTP

In my old site using your v2


Host: www....
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://..............
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest      //<---------------------------------- Ok
Content-Length: 216
Connection: keep-alive

On my site using your v3


Host: ............
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: http://...........
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
//<-------------------------------------------------------------------------------------- Nok
Content-Length: 27
Origin: http://................
Connection: keep-alive

In codeigniter I use _$this->input->is_ajaxrequest() but without this header, is useless.

Thank,

Have a nice day,

Fabrice,

dennybrandes commented 5 years ago

Hey, which jquery-version are you using? Best regards, Denny

emulsion-io commented 5 years ago

Hi,

Edit : Is ok with jquery-3.4.1.min.js

My admin theme use jquery-3.2.1.min.js

Thanks, Fabrice