header-proxy

command module
v0.0.0-...-4867494 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 10 Imported by: 0

README

Header Proxy

The header proxy listens on a port, injects the specified headers into every request and then forwards it.

This is not a production ready project. It was developed and is intended for development purposes only. It was originally created to mimic oauth2_proxy locally.

Usage

$ go run main.go --listen=0.0.0.0:3000 --forward=0.0.0.0:80 --header=foo=bar --header=fizz=buzz
2019/10/17 20:39:55 Listening on 0.0.0.0:3000
2019/10/17 20:39:55 Forwarding to 0.0.0.0:80
2019/10/17 20:39:55 Injecting headers map[fizz:buzz foo:bar]
Docker
$ docker pull jjshanks/header-proxy
$ docker run --rm jjshanks/header-proxy --listen=0.0.0.0:3000 --forward=0.0.0.0:8080 --header=fizz=buzz --header="X-Forwarded-For=client, proxy1, proxy2"
2019/10/20 18:36:18 Listening on 0.0.0.0:3000
2019/10/20 18:36:18 Forwarding to 0.0.0.0:8080
2019/10/20 18:36:18 Injecting headers map[X-Forwarded-For:client, proxy1, proxy2 fizz:buzz]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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