Skip to content

Commit 8d60fcc

Browse files
mrrsmpbrisbin
authored andcommitted
Fix: Send correct Host header based on provided url (#121)
1 parent e86f3e6 commit 8d60fcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TestReporter/ApiClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function send(Entity\JsonFile $json)
3535
'http' => array(
3636
'method' => 'POST',
3737
'header' => array(
38-
'Host: codeclimate.com',
38+
'Host: ' . parse_url($this->apiHost, PHP_URL_HOST),
3939
'Content-Type: application/json',
4040
'User-Agent: Code Climate (PHP Test Reporter v' . Version::VERSION . ')',
4141
'Content-Length: ' . strlen($payload),

0 commit comments

Comments
 (0)