No description
Find a file
2023-12-04 20:01:13 +00:00
.gitlab-ci.yml Initial version 2022-09-21 00:14:18 +02:00
.golangci.yml Initial version 2022-09-21 00:14:18 +02:00
go.mod Initial version 2022-09-21 00:14:18 +02:00
go.sum Initial version 2022-09-21 00:14:18 +02:00
LICENSE Add LICENSE 2023-12-04 20:01:13 +00:00
main.go Initial version 2022-09-21 00:14:18 +02:00
README.md Fix container registry URL 2022-09-21 08:41:21 +00:00

HTTPS Redirector

A basic redirector that answers any http request with a 301 Moved Permanently to https with the same location.

Building

Being a simple go application, it can be built with:

CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -o /redirector .

Running

The application handles the following environment variables for settings

Variable Description Default
LISTEN_HOST Which address to bind to 0.0.0.0
LISTEN_PORT Which port to use 80

Docker

Pre built images can be found in the Container registry

docker run -p 8080:80 registry.touhou.fm/misc/https-redirector:latest

Bare metal

Simply starting the binary is generally enough

./redirector