When env=development use middleware to always auth.
This commit is contained in:
6
api/middleware/alwaysAuthenticatedWhenLocalhost.js
Normal file
6
api/middleware/alwaysAuthenticatedWhenLocalhost.js
Normal file
@@ -0,0 +1,6 @@
|
||||
const alwaysAuthenticatedWhenLocalhost = (req, res, next) => {
|
||||
req.isAuthenticated = () => true;
|
||||
return next();
|
||||
};
|
||||
|
||||
module.exports = alwaysAuthenticatedWhenLocalhost;
|
||||
Reference in New Issue
Block a user