AtAuth

fix: use req.is('json') instead of req.accepts('json') for content negotiation

req.accepts('json') matches the wildcard */* in browser form submissions, causing native form POSTs to get JSON responses instead of 302 redirects. req.is('json') checks the request Content-Type, which correctly differentiates fetch (application/json) from native forms (x-www-form-urlencoded).


Author Bryan Brooks Date Commit Parent 632e36dc
+5 -3
1 changed file
+5 -3
1 changed file