Sign inSign up

nzambello/redirector

By nzambello

Updated over 2 years ago

Simple redirection service

Image
0

10K+

nzambello/redirector repository overview

Redirector

Simple redirection service. Runs on Node and uses Hono.

Can be adapted to run on Bun, Cloudflare Workers, or any other serverless platform.

Available as a Docker image. Repository: nzambello/redirector.

Usage

Configuration

It loads configuration from environment variables:

  • REDIRECT_URL: (required) the url to redirect to
  • PERMANENT: if true, it will return a 301 status code, otherwise 302
Docker example
docker run -p 8787:8787 -e REDIRECT_URL=https://nzambello.dev -e PERMANENT=true nzambello/redirector:latest

Then, open http://localhost:8787/ in your browser.

open http://localhost:8787

and you will be redirected to REDIRECT_URL from your env.

Docker compose example
version: "3.8"

services:
  redirector:
    image: nzambello/redirector:latest
    environment:
      - REDIRECT_URL=https://nzambello.dev
      - PERMANENT=true
    ports:
      - 8787:8787

Development

To update the Docker image:

docker buildx build --platform linux/amd64,linux/arm64 -t nzambello/redirector:latest --push .

Tag summary

Content type

Image

Digest

sha256:36c1c8daa

Size

45.9 MB

Last updated

over 2 years ago

docker pull nzambello/redirector