-
Notifications
You must be signed in to change notification settings - Fork 88
Issue with Ajax POST calls on page loads #113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@mebjas : Can you please look into this? |
@bhavinrshah on it |
So it looks to be related to this - #112 As a temp hack you could try making changes as suggested in this PR. |
I tried but that is not working. |
Yes please make the required changes as dont in that PR in CSRF Protector code. Can you have the projec ton github? I'll send a PR to the same to test this scenario further. |
@mebjas : Let me create a test project on github and let you know |
@mebjas : Here is link https://github.com/bhavinrshah/csrf_issue |
@bhavinrshah will setup the stack and check. Stay tuned. |
@mebjas: Do we have any update on this? |
There is a missing submit.php file to completely reproduce this demo. Can you add some mock submit.php so I can test end to end? |
JS Request:
<script>
$(document).ready(function(){
// ajax call
var postUrl = 'getData.php';
var items = [];
var item = {
strReleaseName : 'test'
};
items.push(item);
var sortorder = {
items : items
};
$.ajax({
type : 'POST',
url : postUrl,
data : "format=json&data="+ JSON.stringify(sortorder),
dataType: "json",
success : function(data, textStatus, XMLHttpRequest){
alert('HI');
},
error: function (xhr, textStatus, errorThrown){
alert('Error');
}
});
});
</script>
Request Header:
Please check.
The text was updated successfully, but these errors were encountered: