summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-24 16:48:22 +0100
committerDouwe Maan <douwe@gitlab.com>2015-03-03 11:21:48 +0100
commitd513ca584aaed7ca2a1de2d2fbd2192422f13d81 (patch)
treee051e2865a33a8e2d2383271d2499b7341e1ce6d
parent2f4656b5c7e2a9b351237432e76a7b928a1684b1 (diff)
downloadgitlab-ce-d513ca584aaed7ca2a1de2d2fbd2192422f13d81.tar.gz
Revert "Merge branch 'go-get-workaround-nginx' of https://github.com/mattes/gitlabhq into mattes-go-get-workaround-nginx"
This reverts commit 51349ca3c83c56e072f87253d375316f7164b49a, reversing changes made to b180476bd69bdf99b1727b041116fa8447c0201f.
-rw-r--r--app/views/layouts/_head.html.haml7
-rw-r--r--lib/support/nginx/gitlab10
-rw-r--r--lib/support/nginx/gitlab-ssl10
3 files changed, 7 insertions, 20 deletions
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index d12145651af..bece8061fb9 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -1,5 +1,12 @@
%head
%meta{charset: "utf-8"}
+
+ -# Go repository retrieval support
+ -# Need to be the fist thing in the head
+ -# Since Go is using an XML parser to process HTML5
+ -# https://github.com/gitlabhq/gitlabhq/pull/5958#issuecomment-45397555
+ - if controller_name == 'projects' && action_name == 'show'
+ %meta{name: "go-import", content: "#{@project.web_url_without_protocol} git #{@project.web_url}.git"}
%meta{content: "GitLab Community Edition", name: "description"}
%title
diff --git a/lib/support/nginx/gitlab b/lib/support/nginx/gitlab
index fd5b2664786..62a4276536c 100644
--- a/lib/support/nginx/gitlab
+++ b/lib/support/nginx/gitlab
@@ -77,16 +77,6 @@ server {
proxy_pass http://gitlab;
}
- ## If ``go get`` detected, return go-import meta tag.
- ## This works for public and for private repositories.
- ## See also http://golang.org/cmd/go/#hdr-Remote_import_paths
- if ($http_user_agent ~* "Go") {
- return 200 "
- <!DOCTYPE html>
- <head><meta content='$host$uri git $scheme://$host$uri.git' name='go-import'></head>
- </html>";
- }
-
## If a file, which is not found in the root folder is requested,
## then the proxy passes the request to the upsteam (gitlab unicorn).
location @gitlab {
diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl
index a9699bac611..2aefc944698 100644
--- a/lib/support/nginx/gitlab-ssl
+++ b/lib/support/nginx/gitlab-ssl
@@ -123,16 +123,6 @@ server {
proxy_pass http://gitlab;
}
- ## If ``go get`` detected, return go-import meta tag.
- ## This works for public and for private repositories.
- ## See also http://golang.org/cmd/go/#hdr-Remote_import_paths
- if ($http_user_agent ~* "Go") {
- return 200 "
- <!DOCTYPE html>
- <head><meta content='$host$uri git $scheme://$host$uri.git' name='go-import'></head>
- </html>";
- }
-
## If a file, which is not found in the root folder is requested,
## then the proxy passes the request to the upsteam (gitlab unicorn).
location @gitlab {