Created
November 12, 2020 07:48
-
-
Save blogcacanid/e08b5e9d5bcb9f10f7665149b080c598 to your computer and use it in GitHub Desktop.
user.routes.js Authentication JWT Node.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { authJwt } = require("../middleware"); | |
const controller = require("../controllers/user.controller"); | |
module.exports = function(app) { | |
app.use(function(req, res, next) { | |
res.header( | |
"Access-Control-Allow-Headers", | |
"x-access-token, Origin, Content-Type, Accept" | |
); | |
next(); | |
}); | |
app.get("/api/test/all", controller.allAccess); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment