Make sure to default the match

This commit is contained in:
Owen
2025-09-15 22:06:36 -07:00
parent 83e107c713
commit fb8f4b95b7
2 changed files with 20 additions and 2 deletions

View File

@@ -579,7 +579,16 @@ export default function ReverseProxyTargets(props: {
return (
<Button
variant="outline"
onClick={() => setShowPathInput(true)}
onClick={() => {
setShowPathInput(true);
// Set default pathMatchType when first showing path input
if (!row.original.pathMatchType) {
updateTarget(row.original.targetId, {
...row.original,
pathMatchType: "prefix"
});
}
}}
>
+ {t("matchPath")}
</Button>

View File

@@ -556,7 +556,16 @@ export default function Page() {
return (
<Button
variant="outline"
onClick={() => setShowPathInput(true)}
onClick={() => {
setShowPathInput(true);
// Set default pathMatchType when first showing path input
if (!row.original.pathMatchType) {
updateTarget(row.original.targetId, {
...row.original,
pathMatchType: "prefix"
});
}
}}
>
+ {t("matchPath")}
</Button>