如何执行来自Phoenix的HTTPS请求并忽略CA错误 [英] How to do HTTPS request from Phoenix and ignore the CA error

查看:66
本文介绍了如何执行来自Phoenix的HTTPS请求并忽略CA错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图从我的phoenix服务器上调用开发环境REST服务,但是我不想将CA列入白名单。作为记录,我什至不知道如何将CA密钥添加到Phoenix的白名单中。

I'm trying to call a dev environment REST service from my phoenix server, but I don't want to whitelist the CA. For the record, I don't even know how to add the CA key to Phoenix's whitelist.

如何从phoenix发出https请求,同时也忽略SSL的CA错误?

How to do https request from phoenix while also ignoring the SSL's CA error?

推荐答案

使用 HTTPoison ,您需要传递:insecure hackney选项。

Using HTTPoison, you need to pass the :insecure hackney option.

HTTPoison.get! url, [], hackney: [:insecure]

这篇关于如何执行来自Phoenix的HTTPS请求并忽略CA错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆