Accessrules() And Ajax

I remember I used to have a problem with accessRules() for authenticated users making ajax request if the user session has expired the return result is the login page. Was there a thought on this while developing Yii2? :)



There will be a different HTTP responsecode + Location header that points to login page, so you can handle situation in your JS code: