Skip to content

Commit

Permalink
Fix ignoring host header (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanaReddy0M authored Apr 4, 2024
1 parent 937f347 commit 1d51f44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/engine/standard/crawl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1d51f44

Please sign in to comment.