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 {
50
50
<% end %>
51
51
proxy_set_header X-Gitlab-Namespace-In-Path $namespace;
52
52
53
- <%= render "nginx-gitlab-pages-http-common-server .erb" %>
53
+ <%= render "nginx-gitlab-pages-http-common-location .erb" %>
54
54
55
55
## Put namespace in path from host before sending it to the user
56
56
<% @proxy_redirect . each do |redirect | %>
Original file line number Diff line number Diff line change 921
921
expect ( content ) . to include ( 'proxy_redirect ~^//(.*)\.(pages\.localhost)/(.*)$ /$1/$3;' )
922
922
expect ( content ) . to include ( 'proxy_redirect ~^/(.*)$ /$namespace/$1;' )
923
923
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
924
929
}
925
930
end
926
931
end
945
950
expect ( content ) . not_to include ( 'proxy_redirect ~^//(.*)\.(pages\.localhost)/(.*)$ /$1/$3;' )
946
951
expect ( content ) . not_to include ( 'proxy_redirect ~^/(.*)$ /$namespace/$1;' )
947
952
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
948
958
}
949
959
end
950
960
end
You can’t perform that action at this time.
0 commit comments