mirror of
https://github.com/pockethost/pockethost.git
synced 2025-03-30 15:08:30 +00:00
instance api router
This commit is contained in:
parent
dae1cbdf2e
commit
f6181d4802
@ -102,11 +102,15 @@ export const proxyService = mkSingleton(
|
||||
|
||||
server.use(cors())
|
||||
|
||||
server.get('/_api/health', (req, res, next) => {
|
||||
const apiRouter = express.Router()
|
||||
|
||||
apiRouter.get('/health', (req, res, next) => {
|
||||
res.json({ status: 'ok' })
|
||||
res.end
|
||||
})
|
||||
|
||||
server.use('/_api', apiRouter)
|
||||
|
||||
// Default locals
|
||||
server.use((req, res, next) => {
|
||||
const host = req.headers.host
|
||||
|
Loading…
x
Reference in New Issue
Block a user