https://github.com/albinodrought/redir
https://github.com/albinodrought/redir
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/albinodrought/redir
- Owner: AlbinoDrought
- License: cc0-1.0
- Created: 2023-12-05T05:46:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-05T06:00:51.000Z (over 1 year ago)
- Last Synced: 2025-02-07T02:46:28.720Z (3 months ago)
- Language: Go
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Redir
Run:
```sh
docker build -t ghcr.io/albinodrought/redir .
docker run --rm -it \
-p 80:8080 \
-e "REDIR_SERVER=nginx/1.10.1" \
-e "REDIR_FALLBACK=172.22.0.4" \
ghcr.io/albinodrought/redir
```Check:
```sh
curl -v -h "Host: " http://localhost:80
``````
> GET / HTTP/1.1
> Host:
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Content-Type: text/html; charset=utf-8
< Location: https://172.22.0.4/
< Server: nginx/1.10.1
< Date: Tue, 05 Dec 2023 05:43:55 GMT
< Content-Length: 54
<
Moved Permanently.
```