mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 18:15:56 +08:00
Prefix base64 encoded cookie (#597)
This commit is contained in:
parent
5dea204fc9
commit
06822b6e7e
|
@ -24,7 +24,7 @@ defmodule Livebook.Utils do
|
|||
"""
|
||||
@spec random_cookie() :: atom()
|
||||
def random_cookie() do
|
||||
:crypto.strong_rand_bytes(35) |> Base.encode32(case: :lower) |> String.to_atom()
|
||||
:"c_#{Base.url_encode64(:crypto.strong_rand_bytes(39))}"
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
|
Loading…
Reference in a new issue