Skip to content

Commit f9d2c98

Browse files
GaibhneKazunori Kimura
authored andcommitted
health check: remove curl's --location option
When the healthcheck feature introduced, the script were generated on build time and url was fixed to "http://localhost/-/liveness". See pull request #2102 nginx is configured to redirect all http traffic to https when `GITLAB_HTTPS` is enabled. (see https://github.com/sameersbn/docker-gitlab/blob/ac9e1fe/assets/runtime/config/nginx/gitlab-ssl#L41-L54), `--location` option is set to follow the redirection. See pull request #2165 Health check script generation has been ported to the runtime, allowing us to dynamically generate health check URLs while referencing configuration parameters. See #2338 If configured correctly, the redirect will not occur and the option can be removed. Original removal suggestion by @Gaibhne , additional (historical) research by @kkimurak. Co-authored-by: Kazunori Kimura <[email protected]>
1 parent 38be108 commit f9d2c98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assets/runtime/functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ generate_healthcheck_script() {
18611861
cat > /usr/local/sbin/healthcheck <<EOF
18621862
#!/bin/bash
18631863
url=${HEALTHCHECK_PROTOCOL}://localhost${GITLAB_RELATIVE_URL_ROOT}/-/liveness
1864-
options=( '--insecure' '--location' '--silent' )
1864+
options=( '--insecure' '--silent' )
18651865
curl "\${options[@]}" \$url
18661866
[[ "\$(curl \${options[@]} -o /dev/null -I -w '%{http_code}' \$url)" == "200" ]]
18671867
EOF

0 commit comments

Comments
 (0)