Test a different strategy to check for ws origin

This commit is contained in:
Andrew Dryga
2023-09-29 16:54:58 -06:00
parent 72044cc065
commit 38f017cdae
2 changed files with 4 additions and 1 deletions

View File

@@ -39,7 +39,6 @@ defmodule Web.Endpoint do
socket "/live", Phoenix.LiveView.Socket,
websocket: [
check_origin: :conn,
connect_info: [
:trace_context_headers,
:user_agent,

View File

@@ -82,6 +82,10 @@ if config_env() == :prod do
path: external_url_path
],
secret_key_base: compile_config!(:secret_key_base),
check_origin: [
"#{external_url_scheme}://#{external_url_host}",
"#{external_url_scheme}://*.#{external_url_host}"
],
live_view: [
signing_salt: compile_config!(:live_view_signing_salt)
]