From 56f211aa50246ff167894fcd050acad88d81f59e Mon Sep 17 00:00:00 2001 From: mattes Date: Fri, 5 Sep 2014 03:57:28 +0200 Subject: allow for private repositories --- lib/support/nginx/gitlab-ssl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/support/nginx/gitlab-ssl') diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl index 4e53d5e8b50..1903c9aa4fb 100644 --- a/lib/support/nginx/gitlab-ssl +++ b/lib/support/nginx/gitlab-ssl @@ -101,6 +101,21 @@ server { try_files $uri $uri/index.html $uri.html @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 " + + + + + + + + "; + } + ## 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 { -- cgit v1.2.1 From 2c9b35732409c2a73150788067e1b03b91101f39 Mon Sep 17 00:00:00 2001 From: mattes Date: Fri, 5 Sep 2014 11:43:52 +0200 Subject: remove optional html tags --- lib/support/nginx/gitlab-ssl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/support/nginx/gitlab-ssl') diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl index 1903c9aa4fb..7fb4d568d21 100644 --- a/lib/support/nginx/gitlab-ssl +++ b/lib/support/nginx/gitlab-ssl @@ -107,12 +107,7 @@ server { if ($http_user_agent ~* "Go") { return 200 " - - - - - - + "; } -- cgit v1.2.1