gerrit-config: Use google's robots.txt from AOSP
Change-Id: I91276bf2aada4918edf8425a9aac8ecc929e7adb
diff --git a/nginx/git.leafos.org b/nginx/git.leafos.org
index e32f56d..9dbb9d2 100644
--- a/nginx/git.leafos.org
+++ b/nginx/git.leafos.org
@@ -64,7 +64,7 @@
proxy_pass http://localhost:8080;
}
location /robots.txt {
- proxy_pass http://localhost:8080/robots.txt;
+ root /var/www/git.leafos.org/static;
}
# git clone
diff --git a/nginx/LeafOS b/nginx/LeafOS
index 60a8213..5b9d916 100644
--- a/nginx/review.leafos.org
+++ b/nginx/review.leafos.org
@@ -34,6 +34,10 @@
sub_filter_once off;
}
+ location /robots.txt {
+ proxy_pass http://localhost:8080/static/robots.txt;
+ }
+
location ^~ /git.leafos.org {
# Used for login redirect on git.leafos.org
rewrite ^/git.leafos.org?(.*)$ https://git.leafos.org/$1 permanent;
diff --git a/nginx/dark.css b/nginx/www/git.leafos.org/static/dark.css
similarity index 100%
rename from nginx/dark.css
rename to nginx/www/git.leafos.org/static/dark.css
diff --git a/nginx/leaf-gitiles.js b/nginx/www/git.leafos.org/static/leaf-gitiles.js
similarity index 100%
rename from nginx/leaf-gitiles.js
rename to nginx/www/git.leafos.org/static/leaf-gitiles.js
diff --git a/nginx/www/git.leafos.org/static/robots.txt b/nginx/www/git.leafos.org/static/robots.txt
new file mode 100644
index 0000000..46ed8aa
--- /dev/null
+++ b/nginx/www/git.leafos.org/static/robots.txt
@@ -0,0 +1,10 @@
+User-Agent: *
+Disallow: /?format=TEXT
+Disallow: /?format=JSON
+Disallow: /new-password
+Disallow: /*/+archive/*
+Disallow: /*/+blame/*
+Disallow: /*/+log/*
+Disallow: *.tar.gz$
+Disallow: *.tar.bz2$
+
diff --git a/static/robots.txt b/static/robots.txt
new file mode 100644
index 0000000..b93e3f5
--- /dev/null
+++ b/static/robots.txt
@@ -0,0 +1,3 @@
+User-Agent: *
+Disallow: /
+