verifyDomainProxy method
Verify the proxy configuration for your domain
This endpoint can be used to validate that a proxy-enabled domain is operational. It tries to verify that the proxy URL provided in the parameters maps to a functional proxy that can reach the Clerk Frontend API. You can use this endpoint before you set a proxy URL for a domain. This way you can ensure that switching to proxy-based configuration will not lead to downtime for your instance. The proxy_url
parameter allows for testing proxy configurations for domains that don't have a proxy URL yet, or operate on a different proxy URL than the one provided. It can also be used to re-validate a domain that is already configured to work with a proxy.
Parameters:
- VerifyDomainProxyRequest verifyDomainProxyRequest:
Implementation
Future<ProxyCheck?> verifyDomainProxy({
VerifyDomainProxyRequest? verifyDomainProxyRequest,
}) async {
final response = await verifyDomainProxyWithHttpInfo(
verifyDomainProxyRequest: verifyDomainProxyRequest,
);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty &&
response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(
await _decodeBodyBytes(response),
'ProxyCheck',
) as ProxyCheck;
}
return null;
}