diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2026-04-24 23:36:52 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2026-06-04 19:39:17 +0200 |
| commit | ac89b3c715fd3eddca7898e069ee04498c1a1ba2 (patch) | |
| tree | eb0294e645dd494ebe2b222292e6f8463d936277 /auth.conf | |
INITIAL COMMIT
Diffstat (limited to 'auth.conf')
| -rw-r--r-- | auth.conf | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/auth.conf b/auth.conf new file mode 100644 index 0000000..39c7550 --- /dev/null +++ b/auth.conf @@ -0,0 +1,10 @@ +auth.backend = "htpasswd" +auth.backend.htpasswd.userfile = "/run/git-host/secrets/htpasswd" + +$HTTP["querystring"] =~ "(^|&)service=git-receive-pack(&|$)" { + auth.require = ("" => ("method" => "basic", "realm" => "Git Host", "require" => "valid-user")) +} + +$HTTP["url"] =~ "^/git/.*/git-receive-pack$" { + auth.require = ("" => ("method" => "basic", "realm" => "Git Host", "require" => "valid-user")) +} |
