A handy but powerful light-weight reverse proxy starter template with Golang.
Update main.go
to forward traffic as you wish. Now /blog
points to https://example.com
and /
points to https://tianpan.co
:
cfgs := []ForwardCfg{
{"/blog", "https://example.com", false},
{"/", "https://tianpan.co", true},
}
and then run the project
make install
make dev
or build to binary
make build
PORT=4321 ./app
MIT