File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ public function wake($site_env, $options = [
5151 ]);
5252 throw new TerminusException ('Could not reach {target} ' , $ wakeStatus );
5353 }
54+ if ($ env ->getSite ()->isNodejs ()) {
55+ // We do not expect a 'styx' header for Node.js sites so if we make it here, we assume success.
56+ $ this ->log ()->notice ('OK >> {target} responded ' , $ wakeStatus );
57+ return ;
58+ }
5459 if (empty ($ wakeStatus ['styx ' ])) {
5560 throw new TerminusException ('Pantheon headers missing, which is not quite right. ' );
5661 }
Original file line number Diff line number Diff line change @@ -1040,12 +1040,18 @@ function ($domain) {
10401040 $ success = false ;
10411041 $ lastError = null ;
10421042
1043+ $ wakeUrl = "https:// {$ domain ->id }/pantheon_healthcheck " ;
1044+ if ($ this ->getSite ()->isNodejs ()) {
1045+ // For Node.js sites, we use the root path for the health check.
1046+ $ wakeUrl = "https:// {$ domain ->id }" ;
1047+ }
1048+
10431049 while ($ attempt < $ maxRetries && !$ success ) {
10441050 $ lastError = null ;
10451051 $ attempt ++;
10461052 try {
10471053 $ response = $ this ->request ()->request (
1048- " https:// { $ domain -> id } /pantheon_healthcheck "
1054+ $ wakeUrl ,
10491055 );
10501056 $ success = ($ response ['status_code ' ] === 200 );
10511057 if ($ success ) {
You can’t perform that action at this time.
0 commit comments