Skip to content

Commit

Permalink
Fix Livebook v0.13.0 auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mbklein committed Jul 24, 2024
1 parent f5e0678 commit 44fa64d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions livebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM ghcr.io/livebook-dev/livebook:latest
ENV LIVEBOOK_AWS_CREDENTIALS=true
ENV LIVEBOOK_IDENTITY_PROVIDER=custom:MeadowLivebookAuth
ENV LIVEBOOK_DISTRIBUTION=name
ENV LIVEBOOK_IP=0.0.0.0
ENV LIVEBOOK_DATA_PATH=/data
ENV LIVEBOOK_DISTRIBUTION=name
ENV LIVEBOOK_HOME=${LIVEBOOK_DATA_PATH}/books
ENV LIVEBOOK_IDENTITY_PROVIDER=custom:MeadowLivebookAuth
ENV LIVEBOOK_IP=0.0.0.0
ENV LIVEBOOK_TOKEN_ENABLED=false
RUN mkdir -p ${LIVEBOOK_DATA_PATH}/books
ADD ./meadow_livebook_auth.exs /app/user/extensions/meadow_livebook_auth.exs
2 changes: 1 addition & 1 deletion livebook/meadow_livebook_auth.exs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ defmodule MeadowLivebookAuth do
defp meadow_auth(url, conn) do
with meadow_cookie <-
conn |> Plug.Conn.fetch_cookies() |> Map.get(:cookies) |> Map.get("_meadow_key") do
Req.get(url,
Req.post(url,
body: @query,
headers: ["Content-Type": "application/graphql", Cookie: "_meadow_key=#{meadow_cookie}"]
)
Expand Down

0 comments on commit 44fa64d

Please sign in to comment.