mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-20 12:29:09 +02:00
[management] Return the reason when custom domain validation fails (#8122)
* [management] Return the reason when custom domain validation fails The validate endpoint returned an empty 202 and ran the check in a goroutine, so a failed verification only reached the management log. Run the check in the request and return 204 or 412 with a classified reason. Resolver errors are not forwarded. * [management] Address review feedback on custom domain validation Pass the request context to the lookup and store calls now that the check runs in the request, compare the self-resolved name case-insensitively, document the 412 like the other entries, and check the returned error in the existing tests. * [management] Match custom domain CNAME targets case-insensitively DNS names are case-insensitive, so a CNAME pointing at the cluster in different casing should validate instead of failing as a mismatch. * [management] Add validation timeout --------- Co-authored-by: DevBot NetBird <91386968+netbirddev@users.noreply.github.com>
This commit is contained in:
@@ -12895,7 +12895,7 @@ paths:
|
||||
/api/reverse-proxies/domains/{domainId}/validate:
|
||||
get:
|
||||
summary: Validate a custom domain
|
||||
description: Trigger domain ownership validation for a custom domain
|
||||
description: Validate domain ownership for a custom domain
|
||||
tags: [ Services ]
|
||||
security:
|
||||
- BearerAuth: [ ]
|
||||
@@ -12908,8 +12908,8 @@ paths:
|
||||
type: string
|
||||
description: The custom domain ID
|
||||
responses:
|
||||
'202':
|
||||
description: Reverse proxy custom domain validation triggered
|
||||
'204':
|
||||
description: Reverse proxy custom domain validated
|
||||
'400':
|
||||
"$ref": "#/components/responses/bad_request"
|
||||
'401':
|
||||
@@ -12918,6 +12918,9 @@ paths:
|
||||
"$ref": "#/components/responses/forbidden"
|
||||
'404':
|
||||
"$ref": "#/components/responses/not_found"
|
||||
'412':
|
||||
description: Precondition failed - the custom domain could not be validated
|
||||
content: { }
|
||||
'500':
|
||||
"$ref": "#/components/responses/internal_error"
|
||||
/api/integrations/notifications/types:
|
||||
|
||||
Reference in New Issue
Block a user