I know how to use MVC's AntiForgeryToken attribute and it's associated HTML helper to help XSRF-secure my application's form POSTs.
Can something similar can be done for JsonResults that implement GET?
For instance, my View contains an onSubmit jQuery call like such:
$.getJSON("/allowActivity/YesOrNo/" + someFormValue, "{}", function(data) {
if(data.Allow) {
//Do something.
}
});
I want to make certain that this JsonResult is only callable from the intended page.
EDIT:
I found this post about a similar question, with no concrete answer.
What is the easiest way to ensure that my GET(non-destructive) URL is consumed only by an AJAX call from my own page?