annotate configuration.js @ 7:51cda3a6e1c3

Better handling of proxy connections; add an option to specify the root on the webserver.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 19 May 2011 19:36:53 +0200
parents 9b2f17ea1594
children e0cd5ede76af
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
1 /*
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
2 * Copyright (C) 2011 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
3 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
4 * This file is the source code of an XMPP avatar retriever.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
5 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
6 * This program is free software: you can redistribute it and/or modify
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
7 * it under the terms of the GNU Affero General Public License as
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
8 * published by the Free Software Foundation, version 3 of the License.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
9 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
13 * GNU Affero General Public License for more details.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
14 *
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
15 * You should have received a copy of the GNU Affero General Public License
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
17 */
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
18
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
19 'use strict';
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
20
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
21 var config = exports;
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
22
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
23 config.jid = 'avatar.example.org';
4
8acaa0a575c7 Allow configuration of the host.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
24 config.host = 'localhost';
8acaa0a575c7 Allow configuration of the host.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
25 config.port = 5347;
0
d5cfe54f11aa Initial commit.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff changeset
26 config.password = 'hellohello';
7
51cda3a6e1c3 Better handling of proxy connections; add an option to specify the root on the webserver.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 5
diff changeset
27
51cda3a6e1c3 Better handling of proxy connections; add an option to specify the root on the webserver.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 5
diff changeset
28 config.webRoot = '^/avatar/';
4
8acaa0a575c7 Allow configuration of the host.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 0
diff changeset
29 config.directory = 'data'; // Directory of the cache.
5
9b2f17ea1594 Add an option to guess the type of an avatar even if it is unspecified.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents: 4
diff changeset
30 config.guessType = false; // When true, assume that the TYPE of the avatar is image/png if not specified.