From b5481afd73798e08f49c32752bcd3de0cf8cbdca Mon Sep 17 00:00:00 2001 From: johannes Date: Sat, 26 Jul 2014 20:31:00 +0200 Subject: Use a ? after the $request_uri to perform a valid Redirect while cloning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixes #6203 before: ❯ curl -I http://gitlab/namespace/repo.git/info/refs?service=git-upload-pack HTTP/1.1 301 Moved Permanently Server: nginx Date: Sat, 26 Jul 2014 18:20:27 GMT Content-Type: text/html Content-Length: 178 Connection: keep-alive Location: https://gitlab/namespace/repo.git/info/refs?service=git-upload-pack?service=git-upload-pack after: ❯ curl -I http://gitlab/namespace/repo.git/info/refs\?service=git-upload-pack HTTP/1.1 301 Moved Permanently Server: nginx Date: Sat, 26 Jul 2014 18:23:54 GMT Content-Type: text/html Content-Length: 178 Connection: keep-alive Location: https://gitlab/namespace/repo.git/info/refs?service=git-upload-pack [ci skip] --- lib/support/nginx/gitlab-ssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/support') diff --git a/lib/support/nginx/gitlab-ssl b/lib/support/nginx/gitlab-ssl index 8f94844d3f9..921620b7787 100644 --- a/lib/support/nginx/gitlab-ssl +++ b/lib/support/nginx/gitlab-ssl @@ -54,7 +54,7 @@ server { server_name YOUR_SERVER_FQDN; ## Replace this with something like gitlab.example.com server_tokens off; ## Don't show the nginx version number, a security best practice root /nowhere; ## root doesn't have to be a valid path since we are redirecting - rewrite ^ https://$server_name$request_uri permanent; + rewrite ^ https://$server_name$request_uri? permanent; } server { -- cgit v1.2.1