Open ErikOwen opened 2 years ago
I tested it for a long time.
found that in the callback function,can not set the host header.
And I try these custom_headers := map[string]string{"Host":"www.google.com"} c := colly.NewCollector( colly.Headers(custom_headers), ) It works.
Hope help you.
I have setup an OnRequest callback like so:
One of these headers is the
Host
header, but colly will not set that specific header. How can I set the "Host" header via the OnRequest callback?