ability-js
ability-js copied to clipboard
ajax support
Currently ability supports only redirects for regular http requests. ajax support could be added by adding check for req.xhr and sending a 403 before hard redirect.
this is how i handled the ajax requests: https://github.com/gautamarora/ability-js/commit/8a20fd143c92f103cce68031cbba86030b71a26a though i had to do it with redirect=false and handle redirects in my code (i tried to do it cleanly with ability but couldnt get it to work..)