File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
files/gitlab-cookbooks/gitlab/templates/default
spec/chef/cookbooks/gitlab/recipes Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ server {
5050 <% end %>
5151 proxy_set_header X-Gitlab-Namespace-In-Path $namespace;
5252
53- <%= render "nginx-gitlab-pages-http-common-server .erb" %>
53+ <%= render "nginx-gitlab-pages-http-common-location .erb" %>
5454
5555 ## Put namespace in path from host before sending it to the user
5656 <% @proxy_redirect . each do |redirect | %>
Original file line number Diff line number Diff line change 921921 expect ( content ) . to include ( 'proxy_redirect ~^//(.*)\.(pages\.localhost)/(.*)$ /$1/$3;' )
922922 expect ( content ) . to include ( 'proxy_redirect ~^/(.*)$ /$namespace/$1;' )
923923 expect ( content ) . to include ( 'proxy_hide_header X-Gitlab-Namespace-In-Path;' )
924+ # Below checks are to verify proper render entries are made
925+ expect ( content ) . to include ( 'proxy_http_version 1.1;' ) . twice
926+ expect ( content ) . to include ( 'proxy_pass' ) . twice
927+ expect ( content ) . to include ( 'disable_symlinks on;' ) . twice
928+ expect ( content ) . to include ( 'server_tokens off;' ) . twice
924929 }
925930 end
926931 end
945950 expect ( content ) . not_to include ( 'proxy_redirect ~^//(.*)\.(pages\.localhost)/(.*)$ /$1/$3;' )
946951 expect ( content ) . not_to include ( 'proxy_redirect ~^/(.*)$ /$namespace/$1;' )
947952 expect ( content ) . to include ( 'proxy_hide_header X-Gitlab-Namespace-In-Path;' )
953+ # Below checks are to verify proper render entries are made
954+ expect ( content ) . to include ( 'proxy_http_version 1.1;' ) . once
955+ expect ( content ) . to include ( 'proxy_pass' ) . once
956+ expect ( content ) . to include ( 'disable_symlinks on;' ) . once
957+ expect ( content ) . to include ( 'server_tokens off;' ) . once
948958 }
949959 end
950960 end
You can’t perform that action at this time.
0 commit comments