mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-08-26 12:46:08 +00:00
gitweb: avoid global environment variables in Apache configuration
Closes #1671 Signed-off-by: Veiko Aasa <veiko17@disroot.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
ef5c2ab908
commit
ea01ef6f80
@ -7,16 +7,6 @@
|
|||||||
## mod_rewrite
|
## mod_rewrite
|
||||||
##
|
##
|
||||||
|
|
||||||
# Make gitweb work with custom FreedomBox configuration.
|
|
||||||
SetEnv GITWEB_CONFIG /etc/gitweb-freedombox.conf
|
|
||||||
|
|
||||||
# Configure git-http-backend to work with our repository path.
|
|
||||||
SetEnv GIT_PROJECT_ROOT /var/lib/git
|
|
||||||
|
|
||||||
# Tell git-http-backend to work with all the projects even when they don't have
|
|
||||||
# the file 'git-daemon-export-ok'.
|
|
||||||
SetEnv GIT_HTTP_EXPORT_ALL
|
|
||||||
|
|
||||||
# All git operations are handled by git-http-backend CGI script. Rest of the
|
# 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.
|
# HTTP requests (say sent by the browser) are handled by gitweb.
|
||||||
ScriptAliasMatch \
|
ScriptAliasMatch \
|
||||||
@ -31,6 +21,9 @@ ScriptAliasMatch \
|
|||||||
Alias /gitweb /usr/share/gitweb
|
Alias /gitweb /usr/share/gitweb
|
||||||
|
|
||||||
<Directory /usr/share/gitweb>
|
<Directory /usr/share/gitweb>
|
||||||
|
# Make gitweb work with custom FreedomBox configuration.
|
||||||
|
SetEnv GITWEB_CONFIG /etc/gitweb-freedombox.conf
|
||||||
|
|
||||||
<If "%{HTTP_COOKIE} =~ /auth_pubtkt=.*tokens.*(admin|git-access)/">
|
<If "%{HTTP_COOKIE} =~ /auth_pubtkt=.*tokens.*(admin|git-access)/">
|
||||||
Include includes/freedombox-single-sign-on.conf
|
Include includes/freedombox-single-sign-on.conf
|
||||||
<IfModule mod_auth_pubtkt.c>
|
<IfModule mod_auth_pubtkt.c>
|
||||||
@ -53,6 +46,13 @@ Alias /gitweb /usr/share/gitweb
|
|||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<Directory /usr/lib/git-core/>
|
<Directory /usr/lib/git-core/>
|
||||||
|
# Configure git-http-backend to work with our repository path.
|
||||||
|
SetEnv GIT_PROJECT_ROOT /var/lib/git
|
||||||
|
|
||||||
|
# Tell git-http-backend to work with all the projects even when they don't
|
||||||
|
# have the file 'git-daemon-export-ok'.
|
||||||
|
SetEnv GIT_HTTP_EXPORT_ALL
|
||||||
|
|
||||||
# Authentication is required when performing git push (git send-pack).
|
# Authentication is required when performing git push (git send-pack).
|
||||||
SetEnvIfExpr "%{QUERY_STRING} =~ /service=git-receive-pack/" AUTHREQUIRED
|
SetEnvIfExpr "%{QUERY_STRING} =~ /service=git-receive-pack/" AUTHREQUIRED
|
||||||
SetEnvIfExpr "%{REQUEST_URI} =~ /git-receive-pack$/" AUTHREQUIRED
|
SetEnvIfExpr "%{REQUEST_URI} =~ /git-receive-pack$/" AUTHREQUIRED
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user