mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-24 06:25:48 +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.use(cors())
|
||||||
|
|
||||||
server.get('/_api/health', (req, res, next) => {
|
const apiRouter = express.Router()
|
||||||
|
|
||||||
|
apiRouter.get('/health', (req, res, next) => {
|
||||||
res.json({ status: 'ok' })
|
res.json({ status: 'ok' })
|
||||||
res.end
|
res.end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
server.use('/_api', apiRouter)
|
||||||
|
|
||||||
// Default locals
|
// Default locals
|
||||||
server.use((req, res, next) => {
|
server.use((req, res, next) => {
|
||||||
const host = req.headers.host
|
const host = req.headers.host
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user