Sign inSign up

fboaventura/dckr-http-redirect

By fboaventura

Updated almost 6 years ago

Image
0

1.0K

fboaventura/dckr-http-redirect repository overview

redirect.docker

This repository was forked from cusspvz/redirect.docker, to have the image updated.

catch all http redirector, useful for http -> https redirects

Insanely fast and small! Based on alpine and nginx.

Launching

docker run -d -e REDIRECT="https://www.google.com/" -p 8080:80 fboaventura/dckr-http-redirect

Now you should be able to browse to http://localhost:8080/any/path and have your browser redirected to https://www.google.com/any/path.

Environment variables

Adjust Dockerfile to override the defaults

VariableDescriptionDefaultValues
HSTSToggles Https Strict Transport Security when it is NON ZERO0
HSTS_INCLUDE_SUBDOMAINSIn case HSTS is on, this toggles the subdomains when it is NON ZERO0
HSTS_MAX_AGE-31536000
WORKER_CONNECTIONS1024
HTTP_PORT80
REDIRECThttps://$host
REDIRECT_TYPEpermanentredirect (302 redirection), permanent (301 redirection)
LARGE_CLIENT_HEADER_BUFFERS8k
HEALTH_CHECK_PATH/health_check

Tag summary

Content type

Image

Digest

Size

4 MB

Last updated

almost 6 years ago

docker pull fboaventura/dckr-http-redirect