allow for private repositories
This commit is contained in:
parent
ac1584249c
commit
56f211aa50
|
|
@ -56,6 +56,21 @@ server {
|
||||||
try_files $uri $uri/index.html $uri.html @gitlab;
|
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 "
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='utf-8'>
|
||||||
|
<meta content='$host$uri git $scheme://$host$uri.git' name='go-import'>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
</html>";
|
||||||
|
}
|
||||||
|
|
||||||
## If a file, which is not found in the root folder is requested,
|
## If a file, which is not found in the root folder is requested,
|
||||||
## then the proxy passes the request to the upsteam (gitlab unicorn).
|
## then the proxy passes the request to the upsteam (gitlab unicorn).
|
||||||
location @gitlab {
|
location @gitlab {
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,21 @@ server {
|
||||||
try_files $uri $uri/index.html $uri.html @gitlab;
|
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 "
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='utf-8'>
|
||||||
|
<meta content='$host$uri git $scheme://$host$uri.git' name='go-import'>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
</html>";
|
||||||
|
}
|
||||||
|
|
||||||
## If a file, which is not found in the root folder is requested,
|
## If a file, which is not found in the root folder is requested,
|
||||||
## then the proxy passes the request to the upsteam (gitlab unicorn).
|
## then the proxy passes the request to the upsteam (gitlab unicorn).
|
||||||
location @gitlab {
|
location @gitlab {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue