mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-28 05:05:25 +00:00
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 }))
|
||||
|
||||
const common: express.RequestHandler = (req, _, next) => {
|
||||
heart.beat()
|
||||
// /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()
|
||||
}
|
||||
|
||||
// Add common variables routes can use.
|
||||
req.args = args
|
||||
|
Loading…
Reference in New Issue
Block a user