diff --git a/backend/scripts/openapi.ts b/backend/scripts/openapi.ts index 6d505c8cb90ca..02b814e2f1571 100644 --- a/backend/scripts/openapi.ts +++ b/backend/scripts/openapi.ts @@ -110,6 +110,7 @@ export function getOpenApi(): OpenAPIObject { description: "Development related endpoints. Only available on dev environment", "x-displayName": "Development", + "x-public": "no", }, ], }, diff --git a/backend/src/middlewares/utility.ts b/backend/src/middlewares/utility.ts index f2dcb6a04903d..383675c157689 100644 --- a/backend/src/middlewares/utility.ts +++ b/backend/src/middlewares/utility.ts @@ -3,6 +3,7 @@ import type { Request, Response, NextFunction, RequestHandler } from "express"; import { handleMonkeyResponse, MonkeyResponse } from "../utils/monkey-response"; import { recordClientVersion as prometheusRecordClientVersion } from "../utils/prometheus"; import { validate } from "./configuration"; +import { isDevEnvironment } from "../utils/misc"; export const emptyMiddleware = ( _req: MonkeyTypes.Request,