From: Alex Pooley (@zuedev) Date: Mon, 23 Mar 2026 11:25:14 +0000 (+0000) Subject: use gitweb's pathinfo instead of caddy rewrites X-Git-Url: http://git.zue.dev/?a=commitdiff_plain;h=fdad1550239d66b9c8a2cc8fe1d3e06386bae055;p=git.zue.dev use gitweb's pathinfo instead of caddy rewrites --- diff --git a/Caddyfile b/Caddyfile index d0a190c..5d443d8 100644 --- a/Caddyfile +++ b/Caddyfile @@ -4,13 +4,5 @@ https://git.zue.dev { encode zstd gzip - - @clean_url { - path_regexp repo ^/([^/]+)/?$ - not path *.css *.js *.png *.gif *.ico - } - - rewrite @clean_url /?p={re.repo.1};a=summary - reverse_proxy http://gitweb:80 } \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 1e1168a..628c582 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -10,7 +10,7 @@ services: - caddy_config:/config links: - gitweb - + gitweb: build: context: . @@ -28,6 +28,7 @@ services: echo "\$$feature{'avatar'}{'default'} = ['gravatar'];" >> /etc/gitweb.conf && \ echo "\$$feature{'timed'}{'default'} = [1];" >> /etc/gitweb.conf && \ echo "\$$feature{'remote_heads'}{'default'} = [1];" >> /etc/gitweb.conf && \ + echo "\$$feature{'pathinfo'}{'default'} = [1];" >> /etc/gitweb.conf && \ nginx -g 'daemon off;' ports: - 8080:80