diff --git a/internal/app/xhttp/handler.go b/internal/app/xhttp/handler.go index e15f6443..92cf22ea 100644 --- a/internal/app/xhttp/handler.go +++ b/internal/app/xhttp/handler.go @@ -338,9 +338,9 @@ func convertAsync(ctx context.Context, p printer.Printer, filename, fpath string } req.Header.Set(echo.HeaderContentType, "application/pdf") // set custom headers (if any). - customHeaders := resource.WebhookURLCustomHTTPHeaders(r) - if len(customHeaders) > 0 { - for key, value := range customHeaders { + customHTTPHeaders := resource.WebhookURLCustomHTTPHeaders(r) + if len(customHTTPHeaders) > 0 { + for key, value := range customHTTPHeaders { req.Header.Set(key, value) logger.DebugfOp(op, "set '%s' to custom HTTP header '%s'", value, key) } diff --git a/internal/pkg/printer/chrome.go b/internal/pkg/printer/chrome.go index 71e16b32..10337fab 100644 --- a/internal/pkg/printer/chrome.go +++ b/internal/pkg/printer/chrome.go @@ -261,13 +261,13 @@ func (p chromePrinter) setCustomHTTPHeaders(ctx context.Context, client *cdp.Cli p.logger.DebugOp(op, "skipping custom HTTP headers as none have been provided...") return nil } - customHeaders := make(map[string]string) + customHTTPHeaders := make(map[string]string) // useless but for the logs. for key, value := range p.opts.CustomHTTPHeaders { - customHeaders[key] = value + customHTTPHeaders[key] = value p.logger.DebugfOp(op, "set '%s' to custom HTTP header '%s'", value, key) } - b, err := json.Marshal(customHeaders) + b, err := json.Marshal(customHTTPHeaders) if err != nil { return err }