http-redirect

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

README

HTTP Redirect

A tiny HTTP server written in Go which does one thing: Redirect incoming requests to another URL.

Quick start

To run with Docker and redirect incoming requests to https://virtualzone.de, use:

docker run --rm -d \
    -p 8080:8080 \
    -e TARGET="https://virtualzone.de" \
    virtualzone/http-redirect

Environment variables

Use environment variables to configure HTTP Redirect:

Env  Default Description
LISTEN_ADDR 0.0.0.0:8080 TCP Listening address and port
TARGET <empty> http://localhost/
APPEND_PATH 1 Append path from requested URL to redirect URL
STATUS_CODE 301  HTTP Status Code

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