File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,12 @@ public function getCommand() {
25
25
);
26
26
$ schedule = preg_match ('/[a-z]/ ' , $ this ->schedule ) ? $ shortcuts [$ this ->schedule ] : $ this ->schedule ;
27
27
28
- $ protocol = (isset ($ _SERVER ['HTTPS ' ]) && !empty ($ _SERVER ['HTTPS ' ]) ? 'https ' : 'http ' );
29
- // $public_url = $protocol . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['SCRIPT_NAME'] . '/' . $this->task;
30
- $ public_url = $ protocol . ':// ' . $ _SERVER ['SERVER_NAME ' ] . $ _SERVER ['SCRIPT_NAME ' ] . '/ ' . $ this ->task ;
28
+ $ public_url = $ this ->task ;
29
+ if (!preg_match ('/https?:/ ' , $ this ->task )) {
30
+ $ protocol = (isset ($ _SERVER ['HTTPS ' ]) && !empty ($ _SERVER ['HTTPS ' ]) ? 'https ' : 'http ' );
31
+ // $public_url = $protocol . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['SCRIPT_NAME'] . '/' . $this->task;
32
+ $ public_url = $ protocol . ':// ' . $ _SERVER ['SERVER_NAME ' ] . $ _SERVER ['SCRIPT_NAME ' ] . '/ ' . $ this ->task ;
33
+ }
31
34
32
35
// TODO: redirect output to application log file.
33
36
// https://github.com/doubleleft/dl-api/issues/37
You can’t perform that action at this time.
0 commit comments