Make a HTTP call to an external service from my server

I have a little app (its a rust app) that makes HTTP calls to an external REST service.
Works fine locally, but fails when invoked in fly.io.

I presume I need to do something with WireGuard, but I’m not sure what. I would imagine I need to proxy from internal fly.io private network to the outside world.
I have no control over the external service, and there are multiple services I need to call (I’m calling the API’s of several service providers)

If anyone know how to go about this, I would greatly appreciate :slightly_smiling_face:
I know how to do this in other platforms like AWS

FYI this is the error when doing the request from rust:
error trying to connect: error:0A000086:SSL routines:tls_post_process_server_certificate:certificate verify failed:…/ssl/statem/statem_clnt.c:1889: (unable to get local issuer certificate)

Thanks,
Justin

Is it possible you need to add:

RUN apt-get update
RUN apt-get install ca-certificates

to your Dockerfile?

(or equivalent for whichever distro your docker image uses)

Thanks! I just got it working, yes, this is very similar to the solution - I had to set the rust http client (reqwest) to use native certs - so it wasn’t an issue with fly.io.

Thanks, I imagine your solution would achieve a similar result.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.