diff --git a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx index a4277f6b..f27022e0 100644 --- a/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx +++ b/src/app/[orgId]/settings/resources/[niceId]/proxy/page.tsx @@ -74,7 +74,10 @@ import { CircleX, ArrowRight, Plus, - MoveRight + MoveRight, + ArrowUp, + Info, + ArrowDown } from "lucide-react"; import { ContainersSelector } from "@app/components/ContainersSelector"; import { useTranslations } from "next-intl"; @@ -106,6 +109,7 @@ import { PathRewriteModal } from "@app/components/PathMatchRenameModal"; import { Badge } from "@app/components/ui/badge"; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@app/components/ui/tooltip"; const addTargetSchema = z .object({ @@ -660,6 +664,47 @@ export default function ReverseProxyTargets(props: { } const columns: ColumnDef[] = [ + { + id: "priority", + header: () => ( +
+ Priority + + + + + + +

Higher priority routes are evaluated first. Use this to ensure specific paths like /api/v1 are checked before catch-all routes like /

+
+
+
+
+ ), + cell: ({ row }) => { + const targetIndex = targets.findIndex(t => t.targetId === row.original.targetId); + return ( +
+ { + const value = parseInt(e.target.value, 10); + if (value >= 1 && value <= 1000) { + updateTarget(row.original.targetId, { + ...row.original, + //priority: value + }); + } + }} + /> +
+ ); + } + }, { accessorKey: "path", header: t("matchPath"),