example/crawler: also set CURLOPT_AUTOREFERER

Could make sense, and it was not used in any example before.

Closes #11283
This commit is contained in:
Daniel Stenberg 2023-06-09 10:03:28 +02:00
parent ce421a7a7f
commit 578becba30
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -95,6 +95,7 @@ CURL *make_handle(char *url)
curl_easy_setopt(handle, CURLOPT_ACCEPT_ENCODING, "");
curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5L);
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(handle, CURLOPT_AUTOREFERER, 1L);
curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 10L);
curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 2L);
curl_easy_setopt(handle, CURLOPT_COOKIEFILE, "");