mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-12-10 05:36:15 +08:00
Don't check request origin for WebSockets connection (#78)
This commit is contained in:
parent
8b37e32e3a
commit
8b3a7bec6b
1 changed files with 4 additions and 1 deletions
|
|
@ -11,7 +11,10 @@ defmodule LivebookWeb.Endpoint do
|
|||
]
|
||||
|
||||
socket "/live", Phoenix.LiveView.Socket,
|
||||
websocket: [connect_info: [:user_agent, session: @session_options]]
|
||||
# Don't check the origin as we don't know how the web app is gonna be accessed.
|
||||
# It runs locally, but may be exposed via IP or domain name.
|
||||
# The WebSocket connection is already protected from CSWSH by using CSRF token.
|
||||
websocket: [check_origin: false, connect_info: [:user_agent, session: @session_options]]
|
||||
|
||||
# We use Escript for distributing Livebook, so we don't
|
||||
# have access to the files in priv/static at runtime in the prod environment.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue