mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-27 03:02:30 +00:00
Fix sanitizing the domain causing problems
This commit is contained in:
@@ -29,6 +29,7 @@ import { Label } from "@app/components/ui/label";
|
|||||||
import { useEnvContext } from "@app/hooks/useEnvContext";
|
import { useEnvContext } from "@app/hooks/useEnvContext";
|
||||||
import { toast } from "@app/hooks/useToast";
|
import { toast } from "@app/hooks/useToast";
|
||||||
import { createApiClient, formatAxiosError } from "@app/lib/api";
|
import { createApiClient, formatAxiosError } from "@app/lib/api";
|
||||||
|
import { finalizeSubdomainSanitize } from "@app/lib/subdomain-utils";
|
||||||
import { UpdateResourceResponse } from "@server/routers/resource";
|
import { UpdateResourceResponse } from "@server/routers/resource";
|
||||||
import { AxiosResponse } from "axios";
|
import { AxiosResponse } from "axios";
|
||||||
import { AlertCircle } from "lucide-react";
|
import { AlertCircle } from "lucide-react";
|
||||||
@@ -506,7 +507,7 @@ export default function GeneralForm() {
|
|||||||
name: data.name,
|
name: data.name,
|
||||||
niceId: data.niceId,
|
niceId: data.niceId,
|
||||||
subdomain: data.subdomain
|
subdomain: data.subdomain
|
||||||
? toASCII(data.subdomain)
|
? toASCII(finalizeSubdomainSanitize(data.subdomain, true))
|
||||||
: undefined,
|
: undefined,
|
||||||
domainId: data.domainId,
|
domainId: data.domainId,
|
||||||
proxyPort: data.proxyPort
|
proxyPort: data.proxyPort
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ export default function Page() {
|
|||||||
const httpData = httpForm.getValues();
|
const httpData = httpForm.getValues();
|
||||||
|
|
||||||
sanitizedSubdomain = httpData.subdomain
|
sanitizedSubdomain = httpData.subdomain
|
||||||
? finalizeSubdomainSanitize(httpData.subdomain)
|
? finalizeSubdomainSanitize(httpData.subdomain, true)
|
||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
Object.assign(payload, {
|
Object.assign(payload, {
|
||||||
|
|||||||
Reference in New Issue
Block a user