From 1d51f442583778388d121b043c757834de23b0d8 Mon Sep 17 00:00:00 2001 From: Ramana Reddy <90540245+RamanaReddy0M@users.noreply.github.com> Date: Thu, 4 Apr 2024 19:21:56 +0530 Subject: [PATCH] Fix ignoring host header (#813) --- 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)