Skip to content

Commit 6dbf08d

Browse files
committed
Ensure PHP automatically intercepts all curl extension usage
1 parent 7c8ce9d commit 6dbf08d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/interceptors/terminal-wrappers/build-php-config.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ function write_ini_file($assoc_arr, $path) {
9797
$phpIniContents['openssl'] = array('openssl.cafile' => getenv('SSL_CERT_FILE'));
9898
}
9999

100+
if ($phpIniContents['curl']) {
101+
$phpIniContents['curl']['curl.cainfo'] = getenv('SSL_CERT_FILE');
102+
} else {
103+
$phpIniContents['curl'] = array('curl.cainfo' => getenv('SSL_CERT_FILE'));
104+
}
105+
100106
// Create a new config file that the real PHP instance will use
101107
$newPhpIni = tempnam(sys_get_temp_dir(), 'httptoolkit-php.ini');
102108
write_ini_file($phpIniContents, $newPhpIni);

0 commit comments

Comments
 (0)