This commit is contained in:
Milo Schwartz
2025-01-04 22:38:46 -05:00
3 changed files with 3 additions and 6 deletions

View File

@@ -59,7 +59,6 @@ import {
SettingsSectionTitle,
SettingsSectionDescription,
SettingsSectionBody,
SettingsSectionForm,
SettingsSectionFooter
} from "@app/components/Settings";
import { SwitchInput } from "@app/components/SwitchInput";
@@ -71,8 +70,6 @@ const addTargetSchema = z.object({
// protocol: z.string(),
});
type AddTargetFormValues = z.infer<typeof addTargetSchema>;
type LocalTarget = Omit<
ArrayElement<ListTargetsResponse["targets"]> & {
new?: boolean;
@@ -182,7 +179,7 @@ export default function ReverseProxyTargets(props: {
// make sure that the target IP is within the site subnet
const targetIp = data.ip;
const subnet = site.subnet;
if (!isIPInSubnet(targetIp, subnet)) {
if (targetIp === "localhost" || !isIPInSubnet(targetIp, subnet)) {
toast({
variant: "destructive",
title: "Invalid target IP",