Skip to content

Commit

Permalink
Fix cacerts for escript version
Browse files Browse the repository at this point in the history
  • Loading branch information
aleDsz committed Jan 23, 2024
1 parent 03062f8 commit 4819a46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/livebook/teams/web_socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ defmodule Livebook.Teams.WebSocket do
uri = URI.parse(Livebook.Config.teams_url())
{http_scheme, ws_scheme} = parse_scheme(uri)
state = %{status: nil, headers: [], body: []}
opts = [protocols: [:http1], transport_opts: [cacerts: :public_key.cacerts_get()]]

with {:ok, conn} <- Mint.HTTP.connect(http_scheme, uri.host, uri.port, protocols: [:http1]),
with {:ok, conn} <- Mint.HTTP.connect(http_scheme, uri.host, uri.port, opts),
{:ok, conn, ref} <- Mint.WebSocket.upgrade(ws_scheme, conn, @ws_path, headers) do
receive_upgrade(conn, ref, state)
else
Expand Down

0 comments on commit 4819a46

Please sign in to comment.