summaryrefslogtreecommitdiff
path: root/per-service
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2016-10-28 10:48:09 -0500
committerAndy Doan <andy.doan@linaro.org>2016-10-28 17:10:16 +0000
commitb06462b93564298443b94b1b53a4f957aec7b8ce (patch)
treea6b0980d3e431029e68b16c85e33fac83230bef2 /per-service
parent1722f29a1a36c69a211ec23363ca67f09e43decf (diff)
downloadansible-playbooks-b06462b93564298443b94b1b53a4f957aec7b8ce.tar.gz
cgit: add rewrite rule for old gitweb "raw" links
People have bookmarks to "raw" file downloads and we also have a lot of CI tooling built around old gitweb links. This preserves backwards compatibility while we go around and fix them. Change-Id: Ic29edc3bdd2c7b14f51bc269854090ef216bbb9a Reviewed-on: https://review.linaro.org/15096 Reviewed-by: Ben Copeland <ben.copeland@linaro.org>
Diffstat (limited to 'per-service')
-rw-r--r--per-service/git-servers/files/git.linaro.org.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/per-service/git-servers/files/git.linaro.org.conf b/per-service/git-servers/files/git.linaro.org.conf
index 83da3ee..d292b96 100644
--- a/per-service/git-servers/files/git.linaro.org.conf
+++ b/per-service/git-servers/files/git.linaro.org.conf
@@ -69,6 +69,9 @@ ServerTokens Prod
RewriteCond %{REQUEST_URI} !^/git/(.*)$
RewriteCond %{REQUEST_URI} !^/git-ro/(.*)$
RewriteRule ^/(.*)$ /git/$1 [nosubreq,nocase,passthrough]
+ # we have things in ci and user bookmarks for gitweb URLs to raw file downloads like:
+ # curl -L http://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py
+ RewriteRule ^/(.*)/blob_plain/HEAD:/(.*)$ $1/plain/$2 [R=301]
AliasMatch ^/git-ro/(.*) {{ repo_root }}/$1
AliasMatch ^/git-http/(.*) {{ repo_root }}/$1
@@ -199,6 +202,9 @@ ServerTokens Prod
RewriteCond %{REQUEST_URI} !^/git/(.*)$
RewriteCond %{REQUEST_URI} !^/git-ro/(.*)$
RewriteRule ^/(.*)$ /git/$1 [nocase,noescape,passthrough]
+ # we have things in ci and user bookmarks for gitweb URLs to raw file downloads like:
+ # curl -L http://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py
+ RewriteRule ^/(.*)/blob_plain/HEAD:/(.*)$ $1/plain/$2 [R=301]
AliasMatch ^/git-ro/(.*) {{ repo_root }}/$1
AliasMatch ^/git-http/(.*) {{ repo_root }}/$1