fix(03): strip TLD from domaincheck input before sending to API
Users naturally type full domains (e.g. "google.de") but the API validates DNS labels only. Extract the label part before the first dot to prevent 400 validation errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,9 +20,9 @@ export function DomainInput({ onSubmit, isLoading }: DomainInputProps) {
|
||||
|
||||
const handleSubmit = (e: FormEvent) => {
|
||||
e.preventDefault();
|
||||
const trimmed = domain.trim();
|
||||
if (trimmed) {
|
||||
onSubmit(trimmed);
|
||||
const label = domain.trim().split('.')[0];
|
||||
if (label) {
|
||||
onSubmit(label);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user