question

Giovanni Frigo avatar image
Giovanni Frigo asked

http.request TrustFailure

I have to execute an API call using CloudScript to an https endpoint which has an HTTPS certificate released by an independent CA authority.

I'm currently getting the following error:

httpRequestError: TrustFailure

I would have access to the .pem and .der files to be able to actually verify the https certificate of the endpoint I'm calling, but I don't think there's a way to have a custom certificate validation on http calls made in CloudScript, is there?

Is there any other way I could force http.request to continue with the request, even if it is not able to verify the validity of the certificate? Thanks!

CloudScript
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

>> but I don't think there's a way to have a custom certificate validation on http calls made in CloudScript, is there?

No, as far as I know, there is no solution to do the custom certificate validation in the CloudScript. And Js does not provide any ways of validating certificates. Generally, the browser would do the certificates validation.

You can consider using PlayFab CloudScript using Azure Functions that support C#. You can do the custom certificates validation in the Azure Functions.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.