Skip to content

Commit cbce074

Browse files
authored
fix: health check should not require auth (#392)
1 parent dd608c5 commit cbce074

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

src/server/middleware/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const withAuth = async (server: FastifyInstance) => {
171171
if (
172172
req.url === "/favicon.ico" ||
173173
req.url === "/" ||
174-
req.url === "/health" ||
174+
req.url === "/system/health" ||
175175
req.url === "/static" ||
176176
req.url === "/json" ||
177177
req.url.startsWith("/auth/payload") ||

src/server/routes/home.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export async function home(fastify: FastifyInstance) {
1313
method: "GET",
1414
url: "/",
1515
schema: {
16+
hide: true,
1617
summary: "/",
1718
description: "Instructions to manage your Engine",
1819
tags: ["System"],

src/server/routes/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export const withRoutes = async (fastify: FastifyInstance) => {
221221
await fastify.register(marketplaceV3Routes);
222222

223223
// System
224+
// These should be hidden by default
224225
await fastify.register(home);
225226
await fastify.register(healthCheck);
226227
await fastify.register(queueStatus);

src/server/routes/system/health.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export async function healthCheck(fastify: FastifyInstance) {
2121
method: "GET",
2222
url: "/system/health",
2323
schema: {
24+
hide: true,
2425
summary: "Check health",
2526
description: "Check the system health of Engine",
2627
tags: ["System"],
@@ -40,7 +41,7 @@ export async function healthCheck(fastify: FastifyInstance) {
4041

4142
res.status(StatusCodes.OK).send({
4243
status: "OK",
43-
engineVersion: process.env.ENGINE_VERSION || undefined,
44+
engineVersion: process.env.ENGINE_VERSION,
4445
});
4546
},
4647
});

src/server/routes/system/queue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export async function queueStatus(fastify: FastifyInstance) {
2323
method: "GET",
2424
url: "/system/queue",
2525
schema: {
26+
hide: true,
2627
summary: "Check queue status",
2728
description: "Check the status of the queue",
2829
tags: ["System"],

0 commit comments

Comments
 (0)