From 193050cae5be5dd7b7a4f7672d877cffd556de69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Wed, 21 Apr 2021 00:04:17 +0200 Subject: [PATCH] Don't print token in URL when disabled --- lib/livebook/application.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/livebook/application.ex b/lib/livebook/application.ex index afd7791df..a914ae247 100644 --- a/lib/livebook/application.ex +++ b/lib/livebook/application.ex @@ -84,10 +84,10 @@ defmodule Livebook.Application do end defp access_url() do - token = Application.get_env(:livebook, :token) 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 else root_url