diff options
author | johannes <johannes@js-webcoding.de> | 2014-07-26 20:31:00 +0200 |
---|---|---|
committer | Johannes Schleifenbaum <johannes@js-webcoding.de> | 2014-08-23 08:36:25 +0200 |
commit | b5481afd73798e08f49c32752bcd3de0cf8cbdca (patch) | |
tree | 658fbea3021bee8f397c0319e2c71f9e793f00eb /lib/support | |
parent | 30ea264b3b8207ae279d37e5162f0b934f22dcea (diff) | |
download | gitlab-ce-b5481afd73798e08f49c32752bcd3de0cf8cbdca.tar.gz |
Use a ? after the $request_uri to perform a valid Redirect while cloning.
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]
Diffstat (limited to 'lib/support')
-rw-r--r-- | lib/support/nginx/gitlab-ssl | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |