diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-18 20:13:19 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-11-18 20:13:19 -0500 |
commit | d5bbe8a3efcbdf927014284f47462014462f136f (patch) | |
tree | 80d3cc5fea0b9f9964351cc54d66532952c6b3cd /git.sr.ht/installation.md | |
parent | 3c624a79b14c941886dc00b5ce80c730d14c85e2 (diff) | |
download | sr.ht-docs-d5bbe8a3efcbdf927014284f47462014462f136f.tar.gz |
Mention /authorize in git.sr.ht installation docs
Diffstat (limited to 'git.sr.ht/installation.md')
-rw-r--r-- | git.sr.ht/installation.md | 12 |
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. |