#5512 closed enhancement (worksforme)
add header option for sending custom http header
Reported by: | quaff | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.4 |
Component: | ajax | Version: | 1.3.2 |
Keywords: | header setRequestHeader | Cc: | |
Blocked by: | Blocking: |
Description
$.ajax({ 'url':'/test', header:{'customHeaderName':'customHeaderValue'} });
Change History (2)
comment:1 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 12 years ago by
Please add method to jquery library to be able to add custom http header for protection against CSRF.
Note: See
TracTickets for help on using
tickets.
That is the purpose of the beforeSend function, it passes you the xhr object and you can call setRequestHeader on it.