headertrace

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 2 Imported by: 0

README



Latest Release Container Image Go Build Go Version Go Report Card License

headertrace is a simple HTTP server echoing back HTTP client Headers in the response body.

It allows also to specify custom headers to be put in the HTTP reply.

It's main usage is to help debugging HTTP header transformations.

Installation

headertrace is built for different OS/architectures as a standalone binary (see the Download Binaries section).

Linux container images for both AMD64 and ARM64 architectures are also available Jump to the Container Images section for more info.

Download Binaries

  1. Visit the releases page and download the appropriate binary for your operating system and architecture:

  2. Rename the downloaded binary to headertrace (or headertrace.exe on Windows):

    mv headertrace-linux-amd64 headertrace
    
  3. Make the binary executable (Linux/macOS only):

    chmod +x headertrace
    
  4. Optionally, move it to a directory in your PATH for easier access:

    sudo mv headertrace /usr/local/bin/
    

Quickstart

Start the HTTP server (default TCP port is 8080):

headertrace

to listen on a particular IP address (or hostname) and TCP port use the -a and -p parameters:

headertrace -a 192.168.1.10 -p 1234

to add custom Headers in all HTTP server replies use the -H flag:

headertrace -H "X-Custom-HDR1:value,X-Custom-HDR2:value"

inline help:

headertrace -h

Container Images

Linux container images are available at Quay.io.

You can run the container images directly with podman or docker:

docker run quay.io/fgiudici/headertrace:latest

and pass the options as usual (see the Quickstart section).

A sample Kubernetes Deployment and an associated Service would look like:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: headertrace
  name: headertrace
  namespace: headertrace
spec:
  replicas: 2
  selector:
    matchLabels:
      app: headertrace
  strategy: {}
  template:
    metadata:
      labels:
        app: headertrace
    spec:
      containers:
      - image: quay.io/fgiudici/headertrace:latest
        args: ["-H X-Served-By:Headertrace"]
        name: headertrace
        ports:
        - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: headertrace
  name: headertrace
  namespace: headertrace
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    app: headertrace
  type: NodePort

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL