Skip to content

Commit

Permalink
Merge pull request #936 from alban-stourbe-wmx/feature/hybrid_headers…
Browse files Browse the repository at this point in the history
…_output

New way to add headers for hybrid request output
  • Loading branch information
Mzack9999 authored Jul 15, 2024
2 parents d835925 + 8cb4d10 commit 604c41b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/engine/hybrid/crawl.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ func (c *Crawler) navigateRequest(s *common.CrawlSession, request *navigation.Re
}
// Note: headers are originally sent using `c.addHeadersToPage` below changes are done so that
// headers are reflected in request dump
// Headers, CustomHeaders, and Cookies are present in e.Request.Headers. We need to consider all of them and not only CustomHeaders
// Otherwise, we will miss headers and output will be inconsistent
if httpreq != nil {
for k, v := range c.Headers {
httpreq.Header.Set(k, v)
for k, v := range e.Request.Headers {
httpreq.Header.Set(k, v.String())
}
}

Expand Down

0 comments on commit 604c41b

Please sign in to comment.