fix: demo-banner (#305)

This commit is contained in:
Charles GTE
2026-06-02 18:36:35 +02:00
committed by GitHub
parent 564dee512f
commit 09791ae86e
5 changed files with 77 additions and 12 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ export async function proxy(request: NextRequest) {
if (url.pathname.startsWith("/api")) {
if (url.pathname.startsWith("/api/v1")) {
const apiEnabled = String(env.API_ENABLED) === "true";
const apiEnabled = env.API_ENABLED;
if (!apiEnabled) {
return new NextResponse(
JSON.stringify({
@@ -53,7 +53,7 @@ export async function proxy(request: NextRequest) {
{ status: 404, headers: { "Content-Type": "application/json" } },
);
}
const openapiEnabled = String(env.OPENAPI_ENABLED) === "true";
const openapiEnabled = env.OPENAPI_ENABLED;
if (
!openapiEnabled &&
(url.pathname.startsWith("/api/v1/docs") ||