Enable arbitrary URLs for http(s) cloning arbitrary_http_clone_uris master
authorJarl Stefansson <jarl.stefansson@gmail.com>
Fri, 6 Sep 2013 15:00:58 +0000 (11:00 -0400)
committerJarl Stefansson <jarl.stefansson@gmail.com>
Fri, 6 Sep 2013 15:00:58 +0000 (11:00 -0400)
commit12e6b68537778f017c6772f3e1b488236a65a920
tree216bf959b5356c76c0fd09f6994ddc95b09c5a41
parentc1105ebe86b1fe28a3dfa336ffa1b513a7054cf4
Enable arbitrary URLs for http(s) cloning

This allows the usage of any URL as the cloning URL used for HTTP(s)
cloning rather than limiting users to git.hostname as the clone URL.
This is useful when wildcard SSL certificates are used and don't support
subdomains.

For example:
    Regular URL: myserver.example.com
    Clone URL: clone-myserver.example.com

Rather than:
    Regular URL: myserver.example.com
    Clone URL git.myserver.example.com

With normal wildcard SSL certificates the latter clone URL would
give errors since it's a subdomain.

To enable this feature see the http_cloning_domain in gitorious.sample.yml
app/metal/git_http_cloner.rb
app/models/repository.rb
app/models/site.rb
config/gitorious.sample.yml
config/initializers/gitorious_config.rb
lib/subdomain_validation.rb
test/unit/lib/subdomain_validation_test.rb
test/unit/repository_test.rb
test/unit/site_test.rb