Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow email verification middleware to work with API routes
Currently if you apply the email verification middleware to an API route (XHR) you get strange/broken behaviour because of the redirect. So, when the request expects JSON, just return a 403. This solves my issues.
- Loading branch information