From b92728b41d60d1b8ff9dacc4a417541df15a8217 Mon Sep 17 00:00:00 2001 From: Wout Mertens Date: Wed, 10 Feb 2021 08:40:49 +0100 Subject: [PATCH] api: elapsed time on X-elapsed header --- source/git-api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/git-api.js b/source/git-api.js index 80c76adba..07c458882 100644 --- a/source/git-api.js +++ b/source/git-api.js @@ -170,7 +170,7 @@ exports.registerApi = (env) => { promise .then((o) => { const elapsed = Date.now() - now; - if (o && typeof o === 'object') o._elapsed = elapsed; + res.header('X-elapsed', elapsed); return res.json(o == null ? {} : o); }) .catch((err) => {