用 Valet secure 過的網站,用 curl 打的時候會遇到:
cURL error 60: SSL certificate problem: unable to get local issuer certificate
兩個地方要設定:
編輯 ~/.zshrc
,加入
export CURL_CA_BUNDLE=${HOME}/.config/valet/CA/LaravelValetCASelfSigned.pem
編輯 /usr/local/etc/php/7.2/php.ini
,找到
;curl.cainfo=
改成:
curl.cainfo=/Users/<yourname>/.config/valet/CA/LaravelValetCASelfSigned.pem