diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-13 10:27:27 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-13 10:28:41 +0100 |
commit | 490e18d5b4c9ab0fa733cb5535ba96b8e5e2edfe (patch) | |
tree | bd40067f67b9e283147d07bd0907b6ce7d126c07 | |
parent | Remove cgit notify. (diff) | |
download | cgit-490e18d5b4c9ab0fa733cb5535ba96b8e5e2edfe.tar.gz cgit-490e18d5b4c9ab0fa733cb5535ba96b8e5e2edfe.tar.xz |
Merge all cgit repo rules into one.
-rw-r--r-- | manifests/nginx.pp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/manifests/nginx.pp b/manifests/nginx.pp index 329c21d..d62229f 100644 --- a/manifests/nginx.pp +++ b/manifests/nginx.pp @@ -48,8 +48,10 @@ class cgit::nginx { }.join("\n") } - nginx::resource::location { - $cgit::public_repos.map |$repo| { "~ ^(/${repo}\\.git/.*)" }: + # TODO each repo name should be regex-escaped + $re = $cgit::public_repos.join('|') + + nginx::resource::location { "~ ^(/(${re})\\.git/.*)" : server => 'cgit', ssl_only => $cgit::certname != undef, priority => 450, |