Skip to content

Commit

Permalink
add comment to websocket example explaining {origin, any}
Browse files Browse the repository at this point in the history
  • Loading branch information
vinoski committed Oct 22, 2012
1 parent b3bc43c commit fb4df1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions www/websockets_example_endpoint.yaws
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<erl>
out(A) ->
CallbackMod = basic_echo_callback,
%% NOTE: change the line below to
%% Opts = [{origin, any}],
%% if you want to accept calls from any origin.
Opts = [{origin, "http://" ++ (A#arg.headers)#headers.host}],
{websocket, CallbackMod, Opts}.
</erl>

0 comments on commit fb4df1f

Please sign in to comment.