Don't print token in URL when disabled

This commit is contained in:
Jonatan Kłosko 2021-04-21 00:04:17 +02:00
parent 52fc451a45
commit 193050cae5

View file

@ -84,10 +84,10 @@ defmodule Livebook.Application do
end end
defp access_url() do defp access_url() do
token = Application.get_env(:livebook, :token)
root_url = LivebookWeb.Endpoint.url() root_url = LivebookWeb.Endpoint.url()
if token do if Livebook.Config.auth_mode() == :token do
token = Application.fetch_env!(:livebook, :token)
root_url <> "/?token=" <> token root_url <> "/?token=" <> token
else else
root_url root_url