Skip to content

Commit 5de8f99

Browse files
committedMar 2, 2018
nixos/jenkins: ensure postStart follows redirects
Pass the -L flag to curl to make it follow redirects. This fixes an issue I found when setting up reverse proxy for Jenkins. Without this fix, the returned HTTP code was stuck at 302, making postStart fail the service (it expects 200 or 403).
1 parent 0e93b0e commit 5de8f99

File tree

1 file changed

+1
-1
lines changed
  • nixos/modules/services/continuous-integration/jenkins

1 file changed

+1
-1
lines changed
 

‎nixos/modules/services/continuous-integration/jenkins/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ in {
208208
'';
209209

210210
postStart = ''
211-
until [[ $(${pkgs.curl.bin}/bin/curl -s --head -w '\n%{http_code}' http://${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} | tail -n1) =~ ^(200|403)$ ]]; do
211+
until [[ $(${pkgs.curl.bin}/bin/curl -L -s --head -w '\n%{http_code}' http://${cfg.listenAddress}:${toString cfg.port}${cfg.prefix} | tail -n1) =~ ^(200|403)$ ]]; do
212212
sleep 1
213213
done
214214
'';

0 commit comments

Comments
 (0)
Please sign in to comment.