I made an ajax request (in the admin html) and got the following response:
"{"error":true,"message":"You entered an invalid Secret Key. Please refresh the page."}"
new Ajax.Request('getAjaxExportUrl() ?>', {
method: 'get',
parameters: {
"store" : "someStore"
}
.
public function getAjaxExportUrl()
{
return $this->getUrl('someURL');
}
What's wrong?
Best Answer
Magento is using secure key validation in admin aria.
Simplest way to use secure key is use POST and add form_key to data. Example: