aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--git.sr.ht/installation.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/git.sr.ht/installation.md b/git.sr.ht/installation.md
index 5473000..45dcb7c 100644
--- a/git.sr.ht/installation.md
+++ b/git.sr.ht/installation.md
@@ -47,11 +47,20 @@ favorite cron daemon. We recommend the following crontab:
git.sr.ht does not do this for you - you need to wire it up in nginx. Here's an
example config:
+ location = /authorize {
+ proxy_pass http://127.0.0.1:5001;
+ proxy_pass_request_body off;
+ proxy_set_header Content-Length "";
+ proxy_set_header X-Original-URI $request_uri;
+ }
+
location ~ ^.*/objects/([0-9a-f]+/[0-9a-f]+|pack/pack-[0-9a-f]+.(pack|idx)).*$ {
+ auth_request /authorize;
root /var/lib/git;
}
location ~ ^.*/(HEAD|info/refs|objects/info/.*|git-(upload|receive)-pack).*$ {
+ auth_request /authorize;
root /var/lib/git;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
@@ -61,3 +70,6 @@ example config:
include fastcgi_params;
gzip off;
}
+
+It's important that you set up the `/authorize` endpoint to enforce the privacy
+of private repositories.