mirror of https://git.tuxpa.in/a/code-server.git
Skip heartbeat on /healthz endpoint (#2333)
I managed to lose this in the rewrite. Fixes #2327.
This commit is contained in:
parent
c6062c3d0a
commit
2a3608df53
|
@ -66,7 +66,11 @@ export const register = async (
|
||||||
app.use(bodyParser.urlencoded({ extended: true }))
|
app.use(bodyParser.urlencoded({ extended: true }))
|
||||||
|
|
||||||
const common: express.RequestHandler = (req, _, next) => {
|
const common: express.RequestHandler = (req, _, next) => {
|
||||||
|
// /healthz|/healthz/ needs to be excluded otherwise health checks will make
|
||||||
|
// it look like code-server is always in use.
|
||||||
|
if (!/^\/healthz\/?$/.test(req.url)) {
|
||||||
heart.beat()
|
heart.beat()
|
||||||
|
}
|
||||||
|
|
||||||
// Add common variables routes can use.
|
// Add common variables routes can use.
|
||||||
req.args = args
|
req.args = args
|
||||||
|
|
Loading…
Reference in New Issue