From 0e2c1cbdeeddb8cdedbc04e2a7dbe762f76147b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 31 Oct 2024 08:31:27 +0100 Subject: [PATCH] Update lib/phoenix/endpoint/supervisor.ex --- lib/phoenix/endpoint/supervisor.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/phoenix/endpoint/supervisor.ex b/lib/phoenix/endpoint/supervisor.ex index ab73ac800c..597f175d90 100644 --- a/lib/phoenix/endpoint/supervisor.ex +++ b/lib/phoenix/endpoint/supervisor.ex @@ -136,9 +136,10 @@ defmodule Phoenix.Endpoint.Supervisor do end defp check_origin_or_csrf_checked!(endpoint_conf, socket_opts) do + check_origin = endpoint_conf[:check_origin] + for {transport, transport_opts} <- socket_opts, is_list(transport_opts) do - check_origin = - Keyword.get(transport_opts, :check_origin, endpoint_conf[:check_origin]) + check_origin = Keyword.get(transport_opts, :check_origin, check_origin) check_csrf = transport_opts[:check_csrf]