~sircmpwn/sr.ht-docs

d5bbe8a3efcbdf927014284f47462014462f136f — Drew DeVault 2 years ago 3c624a7
Mention /authorize in git.sr.ht installation docs
1 files changed, 12 insertions(+), 0 deletions(-)

M git.sr.ht/installation.md
M git.sr.ht/installation.md => git.sr.ht/installation.md +12 -0
@@ 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.