|
|
|
@ -1,6 +1,10 @@ |
|
|
|
listen=TCP_WS |
|
|
|
tcp_accept_no_cl=yes |
|
|
|
|
|
|
|
listen=TCP_WS |
|
|
|
#!ifdef TLS-ROLE |
|
|
|
listen=TLS_WS |
|
|
|
#!endif |
|
|
|
|
|
|
|
######## Generic Hash Table container in shared memory ######## |
|
|
|
modparam("htable", "htable", "websockets=>size=16;autoexpire=7200") |
|
|
|
|
|
|
|
@ -78,11 +82,13 @@ event_route[xhttp:request] |
|
|
|
exit; |
|
|
|
} |
|
|
|
|
|
|
|
# if (!($hdr(Origin) =~ "www.2600hz.com")) { |
|
|
|
# xlog("L_INFO", "websocket|log|rejecting HTTP request with unknown origin $hdr(Origin) from $si:$sp\n"); |
|
|
|
# xhttp_reply("400", "Bad Request", "", ""); |
|
|
|
# exit; |
|
|
|
# } |
|
|
|
#!ifdef MY_WEBSOCKET_DOMAIN |
|
|
|
if (!($hdr(Origin) =~ "MY_WEBSOCKET_DOMAIN")) { |
|
|
|
xlog("L_INFO", "websocket|log|rejecting HTTP request with unknown origin $hdr(Origin) from $si:$sp\n"); |
|
|
|
xhttp_reply("400", "Bad Request", "", ""); |
|
|
|
exit; |
|
|
|
} |
|
|
|
#!endif |
|
|
|
|
|
|
|
if($sht(websockets=>$si::count) == $null) { |
|
|
|
$var(count) = 1; |
|
|
|
|