Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sawa Demidenko
committed
Dec 12, 2017
1 parent
109cbfd
commit fd6d63d
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# configuration of the server | ||
server { | ||
listen 80; | ||
server_name controller.*; | ||
|
||
# the domain name it will serve for | ||
charset utf-8; | ||
|
||
# max upload size | ||
client_max_body_size 75M; # adjust to taste | ||
|
||
location / { | ||
proxy_pass http://127.0.0.1:8003/; | ||
} | ||
|
||
location /publish { | ||
# activate publisher (admin) mode for this location | ||
push_stream_publisher admin; | ||
|
||
# query string based channel id | ||
push_stream_channels_path $arg_id; | ||
} | ||
|
||
location ~ /ws(.*) { | ||
# activate websocket mode for this location | ||
push_stream_subscriber websocket; | ||
|
||
# positional channel path | ||
push_stream_channels_path $1; | ||
# message template | ||
push_stream_message_template "{\"id\":~id~,\"channel\":\"~channel~\",\"text\":\"~text~\"}"; | ||
|
||
push_stream_websocket_allow_publish on; | ||
|
||
# ping frequency | ||
push_stream_ping_message_interval 10s; | ||
} | ||
} |