mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-10 21:46:46 +08:00
Bug fix ZTA (#2533)
This commit is contained in:
parent
26d39772e8
commit
0ff1b8d19c
2 changed files with 6 additions and 1 deletions
|
@ -705,7 +705,7 @@ defmodule Livebook.Config do
|
|||
provider ->
|
||||
with [type, key] <- String.split(provider, ":", parts: 2),
|
||||
%{^type => module} <- identity_provider_type_to_module() do
|
||||
{module, key}
|
||||
{:zta, module, key}
|
||||
else
|
||||
_ -> abort!("invalid configuration for identity provider given in #{env}")
|
||||
end
|
||||
|
|
|
@ -43,6 +43,11 @@ defmodule Livebook.ConfigTest do
|
|||
assert Config.identity_provider!("TEST_IDENTITY_PROVIDER") ==
|
||||
{:custom, LivebookWeb.SessionIdentity, "extra"}
|
||||
end)
|
||||
|
||||
with_env([TEST_IDENTITY_PROVIDER: "cloudflare:123"], fn ->
|
||||
assert Config.identity_provider!("TEST_IDENTITY_PROVIDER")
|
||||
{:zta, Livebook.ZTA.Cloudflare, "123"}
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue