From 4f6f6ba4bf686bb533e88909b863a1fb09f970e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 29 Dec 2021 23:55:36 +0100 Subject: Public repos.? --- manifests/site.pp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/manifests/site.pp b/manifests/site.pp index e2338d1..1fca9eb 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -365,7 +365,23 @@ node 'hornquist.se' { }.join("\n") } - nginx::resource::location { '~ \.git(/.*)': + nginx::resource::location { + $cgit::public_repos.map |$repo| { "~ ^(/${repo}\\.git/.*)" }: + server => 'cgit', + ssl_only => true, + priority => 450, + fastcgi => 'unix:/run/fcgiwrap.socket', + fastcgi_params => 'fastcgi_params', + fastcgi_param => { + 'SCRIPT_FILENAME' => '/usr/lib/git-core/git-http-backend', + 'GIT_PROJECT_ROOT' => '/home/git/git', + 'GIT_HTTP_EXPORT_ALL' => '""', + 'PATH_INFO' => '$1', + } + } + + + nginx::resource::location { '~ (.*\.git/.*)': server => 'cgit', ssl_only => true, location_cfg_append => { -- cgit v1.2.3