Handle wildcard proxy hosts and stabilize test coverage
- accept wildcard proxy host domains like *.example.com with validation and normalization - make exact hosts win over overlapping wildcards in generated routes and TLS policies - add unit coverage for host-pattern priority and wildcard domain handling - add a single test:all entry point and clean up lint/typecheck issues so the suite runs cleanly - run mobile layout Playwright checks under both chromium and mobile-iphone
This commit is contained in:
@@ -85,7 +85,7 @@ export function CreateHostDialog({
|
||||
label="Domains"
|
||||
placeholder="app.example.com"
|
||||
defaultValue={initialData?.domains.join("\n") ?? ""}
|
||||
helperText="One per line or comma-separated"
|
||||
helperText="One per line or comma-separated. Wildcards like *.example.com are supported."
|
||||
multiline
|
||||
minRows={2}
|
||||
required
|
||||
@@ -190,7 +190,7 @@ export function EditHostDialog({
|
||||
name="domains"
|
||||
label="Domains"
|
||||
defaultValue={host.domains.join("\n")}
|
||||
helperText="One per line or comma-separated"
|
||||
helperText="One per line or comma-separated. Wildcards like *.example.com are supported."
|
||||
multiline
|
||||
minRows={2}
|
||||
fullWidth
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
|
||||
import { Box, Stack, Switch, Typography } from "@mui/material";
|
||||
import type { SwitchProps } from "@mui/material";
|
||||
import { useState } from "react";
|
||||
|
||||
type ToggleSetting = {
|
||||
name: string;
|
||||
name: "hsts_subdomains" | "skip_https_hostname_validation";
|
||||
label: string;
|
||||
description: string;
|
||||
defaultChecked: boolean;
|
||||
color?: "success" | "warning" | "default";
|
||||
color?: SwitchProps["color"];
|
||||
};
|
||||
|
||||
type SettingsTogglesProps = {
|
||||
@@ -123,10 +124,10 @@ export function SettingsToggles({
|
||||
</Box>
|
||||
<Switch
|
||||
name={setting.name}
|
||||
checked={values[setting.name as keyof typeof values] as boolean}
|
||||
onChange={handleChange(setting.name as keyof typeof values)}
|
||||
checked={values[setting.name]}
|
||||
onChange={handleChange(setting.name)}
|
||||
size="small"
|
||||
color={setting.color as any}
|
||||
color={setting.color}
|
||||
/>
|
||||
</Stack>
|
||||
</Box>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
import { Box, Button, IconButton, Stack, TextField, Tooltip, Typography, Autocomplete, InputAdornment } from "@mui/material";
|
||||
import { Box, Button, IconButton, Stack, TextField, Tooltip, Typography, Autocomplete } from "@mui/material";
|
||||
import AddIcon from "@mui/icons-material/Add";
|
||||
import RemoveCircleIcon from "@mui/icons-material/RemoveCircle";
|
||||
import { useState } from "react";
|
||||
|
||||
Reference in New Issue
Block a user