We have a question about the CURL, we can’t hit CURL “www” if under Cloudflare.
Let say “www.abc.com/123.html”, the error should be:
curl: (60) Issuer certificate is invalid.
More details here: curl - SSL CA Certificates
However, we remove the “www”
i.e. “abc.com/123.html”, it works properly.
HTTP/1.1 301 Moved Permanently
Date: Tue, 12 May 2020 09:10:49 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Tue, 12 May 2020 10:10:49 GMT
Is possible CURL can hit both “www” and “without www” under Cloudflare? thanks!
curl performs SSL certificate verification by default, using a “bundle”
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn’t adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you’d like to turn off curl’s verification of the certificate, use
the -k (or --insecure) option.
I can not answer this one as it works for me. Pls give it a try on another machine
This is due to the fact, that you redirect from “non www” to “www”.
To meassure the endpoint pls add the option -L (curl - How To Use) which will follow the redirect and meassure the target it reaches there.