]> Untitled Git - git4ai.git/commitdiff
Make sure http-git is readonly
authorNikolay Shaplov <dhyan@nataraj.su>
Sun, 7 Jun 2026 18:43:30 +0000 (18:43 +0000)
committerNikolay Shaplov <dhyan@nataraj.su>
Sun, 7 Jun 2026 18:43:30 +0000 (18:43 +0000)
conf/nginx/git4ai

index b045aac70f08553fd5d5357d3bbf83521337b258..a0b8284009dc12990bfc2773bdc666d510d09b16 100644 (file)
@@ -115,6 +115,10 @@ location ~ "^/git4ai[^/]*/([a-zA-Z0-9._-]+)/([a-zA-Z0-9._-]+|-)/([0-9a-f]{4,40}|
 }
 
   location ~ ^/git(/.*) {
+       # Read only repo
+       limit_except GET HEAD {
+               deny all;
+       }
         fastcgi_pass unix:/var/run/fcgiwrap.socket;
         fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
         fastcgi_param GIT_PROJECT_ROOT /var/lib/git;