mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
gitweb: fix links that end with /HEAD
On the Gitweb site, links that end with /HEAD (for example menu links after selecting 'tree' on the front page) are mistakenly redirected to the git-http-backend cgi script and an empty page is shown to the user. Modified Apache2 ScriptAliasMatch regex so that git-http-backend services get redirected only if they immediately follow repository's name path component. Links on Gitweb site have additional action component before /HEAD and those will be handled by the gitweb cgi script. The relevant git-http-backend source: https://repo.or.cz/git/debian.git/blob/refs/tags/v2.20.1:/http-backend.c#l706 Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
bb7890263b
commit
0b2d1265cb
@ -10,7 +10,7 @@
|
||||
# All git operations are handled by git-http-backend CGI script. Rest of the
|
||||
# HTTP requests (say sent by the browser) are handled by gitweb.
|
||||
ScriptAliasMatch \
|
||||
"(?x)^/gitweb/(.*/(HEAD | \
|
||||
"(?x)^/gitweb/([^/]+/(HEAD | \
|
||||
info/refs | \
|
||||
objects/(info/[^/]+ | \
|
||||
[0-9a-f]{2}/[0-9a-f]{38} | \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user