Skip to content

Commit

Permalink
Конфигурационный файл для nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
Sawa Demidenko committed Dec 12, 2017
1 parent 109cbfd commit fd6d63d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions push_notifications/nginx/push.conf
@@ -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;
}
}

0 comments on commit fd6d63d

Please sign in to comment.