Skip to content

Commit a628a47

Browse files
authored
Merge pull request #1327 from code-corps/add-check-origin-to-user-socket
Add check_origin to UserSocket
2 parents 40a1f05 + 743e468 commit a628a47

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/code_corps_web/channels/user_socket.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ defmodule CodeCorpsWeb.UserSocket do
66

77
## Transports
88
transport :websocket, Phoenix.Transports.WebSocket,
9-
timeout: 45_000
9+
timeout: 45_000,
10+
check_origin: Application.get_env(:code_corps, :allowed_origins)
1011
# transport :longpoll, Phoenix.Transports.LongPoll
1112

1213
# Socket params are passed from the client and can

0 commit comments

Comments
 (0)