mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
Make sure to default the match
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user