[aur-dev] [PATCH] Improve the regular expression to match HTTP clones

Lukas Fleischer lfleischer at archlinux.org
Fri Jun 12 14:40:15 UTC 2015


Specifically check for URIs git-http-backend(1) can handle. This also
allows us to make the ".git" suffix optional.

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 INSTALL | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/INSTALL b/INSTALL
index a2a6153..9040c17 100644
--- a/INSTALL
+++ b/INSTALL
@@ -48,7 +48,7 @@ Setup on Arch Linux
 9) If you want to enable smart HTTP support with nginx and uWSGI, you can use
    the following directives:
 
-    location ~ ^/([a-z0-9][a-z0-9.+_-]*)\.git/(.*)$ {
+    location ~ "^/([a-z0-9][a-z0-9.+_-]*?)(\.git)?/(git-(receive|upload)-pack|HEAD|info/refs|objects/(info/(http-)?alternates|packs)|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))$" {
         include uwsgi_params;
         uwsgi_modifier1 9;
         uwsgi_param PATH_INFO /aur.git/$2;
-- 
2.4.3


More information about the aur-dev mailing list