fix: add health endpoint to git mirror
This commit is contained in:
@@ -2841,7 +2841,7 @@ createServer((req, res) => {
|
||||
|
||||
async function handle(req, res) {
|
||||
const url = new URL(req.url || "/", "http://git-mirror-http");
|
||||
if (req.method === "GET" && url.pathname === "/") {
|
||||
if (req.method === "GET" && (url.pathname === "/" || url.pathname === "/health")) {
|
||||
res.writeHead(200, { "content-type": "application/json", "cache-control": "no-cache" });
|
||||
res.end(JSON.stringify({ ok: true, service: "git-mirror-smart-http" }));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user