From ed55de040c058bb67b78d1a944b4209bf389599c Mon Sep 17 00:00:00 2001 From: Ramana Reddy Date: Wed, 20 Mar 2024 22:09:58 +0530 Subject: [PATCH] Fix ignoring host header --- pkg/engine/standard/crawl.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/engine/standard/crawl.go b/pkg/engine/standard/crawl.go index 1281d45b..933e038b 100644 --- a/pkg/engine/standard/crawl.go +++ b/pkg/engine/standard/crawl.go @@ -41,9 +41,15 @@ func (c *Crawler) makeRequest(s *common.CrawlSession, request *navigation.Reques // Set the headers for the request. for k, v := range request.Headers { req.Header.Set(k, v) + if k == "Host" { + req.Host = v + } } for k, v := range c.Headers { req.Header.Set(k, v) + if k == "Host" { + req.Host = v + } } resp, err := s.HttpClient.Do(req)