changeset 9:9360b78c7a5b

Add WebHost configuration, and default it to both IPv6 and IPv4.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 22 May 2011 23:10:02 +0200
parents e0cd5ede76af
children a637cde69f71
files avatar.js configuration.js
diffstat 2 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/avatar.js
+++ b/avatar.js
@@ -318,4 +318,4 @@ http.createServer(function (req, res) {
 	}
 
 	getVCard(jid, res);
-}).listen(config.webPort);
+}).listen(config.webPort, config.webHost);
--- a/configuration.js
+++ b/configuration.js
@@ -33,9 +33,12 @@ config.port = 5347;
 // Root of the webservice, useful if you want to proxy it.
 config.webRoot = '^/avatar/';
 
-// It is the port on which the web service will listen.  If you want a
-// port < 1024, you have to start it as root, use a proxy or redirect
-// it using a firewall like iptables.
+// These are the host and the port on which the web service will
+// listen.  If you want IPv4 connection only, instead of both IPv4 and
+// IPv6, replace '::' by '0.0.0.0'.  If you want a port < 1024, you
+// have to start it as root, use a proxy or redirect it using a
+// firewall like iptables.
+config.webHost = '::';
 config.webPort = 8032;
 
 // Directory for the cache of the images.