Authenticate.php
676 Bytes
-
Don't return a login page to a JSON request · 5b3c5f3f
Currently, any unauthorized API requests that pass through the `auth` middleware get a redirect to the login page. Adding the `wantsJson` flag to the conditional corrects this behavior.
Jacob Bennett committed