Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

417 B
Raw Blame
import type { Response } from "undici";

import { readBoundedJsonResponseAsync as readBoundedJsonResponse } from "@homarr/common/server";

export const MAX_TRAEFIK_RESPONSE_BYTES = 2 * 1024 * 1024;

export async function readBoundedTraefikJsonAsync(
  response: Response,
  maxBytes = MAX_TRAEFIK_RESPONSE_BYTES,
): Promise<unknown> {
  return await readBoundedJsonResponse(response, maxBytes, "Traefik response");
}