Regex location matching in Nginx config broken from bad regex

The default regex statement designed to disable proxy cache and body buffering, will not work with a bad regex pattern in it.

https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/files/gitlab-cookbooks/gitlab/attributes/default.rb#L694-695

This section of the string is the culprit and when removed, the remaining pattern match appears to match paths properly:

\.git/info/refs?service=git-receive-pack$"

There may be some other Nginx config patterns to match on query strings for this purpose, but since the overall location is not being matched in the Nginx config, this is effectively not working at all and I propose we remove the query-string based regex from the default.

Nginx template where this attribute is used: https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb#L165-169 Reference issue for Gitlab.com: https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/11134

Assignee Loading
Time tracking Loading