Skip to content
Snippets Groups Projects
Commit b0e9b299 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Add logs for unauthorized calls of broadcast method

parent 9113bc89
No related branches found
No related tags found
No related merge requests found
......@@ -59,10 +59,12 @@
stream: (streamName, args) ->
# Prevent call from self and client
if not @connection? or @connection.clientAddress?
console.log "Stream for broadcast with name #{streamName} from client or self is not authorized".red
return
# Prevent call from unauthrorized connections
if @connection.broadcastAuth isnt true
console.log "Stream for broadcast with name #{streamName} not authorized".red
return
console.log 'method stream', streamName, args
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment