chiark / gitweb /
git-daemon: allow virtual hosts to forbit tilde parts in URLs
[userv-utils.git] / git-daemon / git-daemon-vhosts.pl
1 # Configuration file for the userv git daemon.
2 #
3 # This was written by Tony Finch <dot@dotat.at>
4 # You may do anything with it, at your own risk.
5 # http://creativecommons.org/publicdomain/zero/1.0/
6
7 # The userv git daemon supports URLs of the forms:
8 #       git://HOSTNAME/REPO.git
9 #       git://HOSTNAME/~TILDE/REPO.git
10
11 $HOSTNAME = qr{[-.0-9a-z]+};
12 $TILDE    = qr{[0-9a-z]+};
13 $REPO     = qr{[-+._0-9A-Za-z]+};
14
15 # The vhost_default_user hash specifies what user handles git requests
16 # for each virtual host, if the URL does not have a tilde part, or if
17 # the virtual hosts does not appear in either vhost_tilde hash. If a
18 # virtual host does not appear in this hash then it does not permit
19 # URLs without tilde parts.
20
21 %vhost_default_user = (
22         'dotat.at' => 'fanf',
23 );
24
25 # The vhost_tilde_is_user hash specifies which virtual hosts use the
26 # tilde part of a URL to specify the user that handles the request.
27
28 %vhost_tilde_is_user = (
29         'chiark.greenend.org.uk' => 1,
30 );
31
32 # The vhost_tilde_forbidden hash specifies which virtual hosts do not
33 # permit URLs with tilde parts.
34
35 %vhost_tilde_forbidden = (
36         'dotat.at' => 1,
37 );
38
39 # end