Simple HTTP redirector with no dependencies
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
I wanted a very simple HTTP redirector container that could take some env variables and have no depenencies as almost everything else I could find was based on NGINX and way over the top to configure.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
You need GOLANG to build and test locally and a OCI compatible container builder to build the complete container.
- Clone the repo
git clone https://github.com/keifgwinn/redirector.git
- go build for local development
go build
- docker build .
docker build .
-
Set an ENV variable for REDIRECT_URL and REDIRECT_CODE
export REDIRECT_URL = 'https://github.com/keifgwinn/redirector'; export REDIRECT_CODE = '307';
-
Execute the program
./redirector
-
All in one line
REDIRECT_URL='https://github.com/keifgwinn/redirector' REDIRECT_CODE=307 ./redirector
- Configurable port to listen on
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GNU License. See LICENSE.txt
for more information.
Keif Gwinn - @keif - keif@keif.co.uk
Project Link: https://github.com/keifgwinn/redirector