mirror of
https://github.com/github/codeql.git
synced 2025-12-18 18:10:39 +01:00
13 lines
347 B
JavaScript
13 lines
347 B
JavaScript
const express = require('express');
|
|
let app = express();
|
|
|
|
app.use("/admin", protect)
|
|
app.use("/", makeSubRouter())
|
|
|
|
function makeSubRouter() {
|
|
var router = express.Router()
|
|
router.post("/action1", handler1) // not affected by `protect`
|
|
router.post("/admin/action2", handler2) // affected by `protect` (but not recognised)
|
|
return router;
|
|
}
|