public
Description: This is a Bare Bones app used to demonstrate what Juggernaut has to offer
Homepage:
Clone URL: git://github.com/taelor/chat_sandbox.git
Click here to lend your support to: chat_sandbox and make a donation at www.pledgie.com !
chat_sandbox / juggernaut.yml
100644 104 lines (83 sloc) 3.981 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# ======================
# Juggernaut Options
# ======================
 
# === Subscription authentication ===
# Leave all subscription options uncommented to allow anyone to subscribe.
 
# If specified, subscription_url is called everytime a client subscribes.
# Parameters passed are: session_id, client_id and an array of channels.
#
# The server should check that the session_id matches up to the client_id
# and that the client is allowed to access the specified channels.
#
# If a status code other than 200 is encountered, the subscription_request fails
# and the client is disconnected.
#
# :subscription_url: http://localhost:3000/sessions/juggernaut_subscription
 
# === Broadcast and query authentication ===
# Leave all broadcast/query options uncommented to allow anyone to broadcast/query.
#
# Broadcast authentication in a production environment is very importantant since broadcasters
# can execute JavaScript on subscribed clients, leaving you vulnerable to cross site scripting
# attacks if broadcasters aren't authenticated.
 
# 1) Via IP address
#
# If specified, if a client has an ip that is specified in allowed_ips, than it is automatically
# authenticated, even if a secret_key isn't provided.
#
# This is the recommended method for broadcast authentication.
#
:allowed_ips:
      - 127.0.0.1
      #- 192.168.0.6
 
# 2) Via HTTP request
#
# If specified, if a client attempts a broadcast/query, without a secret_key or using an IP
# no included in allowed_ips, then broadcast_query_login_url will be called.
# Parameters passed, if given, are: session_id, client_id, channels and type.
#
# The server should check that the session_id matches up to the client id, and the client
# is allowed to perform that particular type of broadcast/query.
#
# If a status code other than 200 is encountered, the broadcast_query_login_url fails
# and the client is disconnected.
#
# :broadcast_query_login_url: http://localhost:3000/sessions/juggernaut_broadcast
 
# 3) Via shared secret key
#
# This secret key must be sent with any query/broadcast commands.
# It must be the same as the one in the Rails config file.
#
# You shouldn't authenticate broadcasts from subscribed clients using this method
# since the secret_key will be easily visible in the page (and not so secret any more)!
#
# :secret_key: 5f4933fe299fc8bdb3199a7cbebac7ed848cf956
 
# == Subscription Logout ==
 
# If specified, logout_connection_url is called everytime a specific connection from a subscribed client disconnects.
# Parameters passed are session_id, client_id and an array of channels specific to that connection.
#
# :logout_connection_url: http://localhost:3000/sessions/juggernaut_connection_logout
 
# Logout url is called when all connections from a subscribed client are closed.
# Parameters passed are session_id and client_id.
#
# :logout_url: http://localhost:3000/sessions/juggernaut_logout
 
# === Miscellaneous ===
 
# timeout defaults to 10. A timeout is the time between when a client closes a connection
# and a logout_request or logout_connection_request is made. The reason for this is that a client
# may only temporarily be disconnected, and may attempt a reconnect very soon.
#
# :timeout: 10
 
# store_messages defaults to false. If this option is true, messages send to connections will be stored.
# This is useful since a client can then receive broadcasted message that it has missed (perhaps it was disconnected).
#
# :store_messages: false
 
# === Server ===
 
# Host defaults to "0.0.0.0". You shouldn't need to change this.
# :host: 0.0.0.0
 
# Port is mandatory
:port: 5001
 
:logout_connection_url: http://localhost:3000/connections/logout
 
:subscription_url: http://localhost:3000/connections/login
 
:users_request_url: http://localhost:3000/connections/users
 
# Defaults to value of :port. If you are doing port forwarding you'll need to configure this to the same
# value as :public_port in the juggernaut_hosts.yml file
# :public_port: 5001