https://github.com/jmervine/unstick
Simple HTTP Listener that removes a cookie and redirects, or not.
https://github.com/jmervine/unstick
cookies golang http redirect
Last synced: 8 months ago
JSON representation
Simple HTTP Listener that removes a cookie and redirects, or not.
- Host: GitHub
- URL: https://github.com/jmervine/unstick
- Owner: jmervine
- Created: 2019-05-03T06:01:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-03T21:30:33.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T09:55:15.201Z (almost 2 years ago)
- Topics: cookies, golang, http, redirect
- Language: HCL
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unstick
Simple HTTP Listener that removes a cookie and redirects, or not.
## Configs
All configurations are set via envrionment variables.
env var | description | default | required
--- | --- | --- | ---
COOKIE\_NAME | Semicolon seperated list of cookies to be deleted. | none | yes
REDIRECT | The target location for redirection. | none | no
PORT | Port to listen on. | 8000 | no
BIND | The bind address. | 127.0.0.1 | no
USE\_SSL | Enable SSL Handling. | false | no
SERVER\_KEY | SSL server.key file path. Requires USE\_SSL=true. | none | no
SERVER\_CRT | SSL server.crt file path. Requires USE\_SSL=true. | none | no
DEBUG | Enable debug messages. | false | no
## Docker examples
```
docker run -e COOKIE_NAME=SESSION_AFFINITY jmervine/unstick:latest
```
**With SSL**
```
# Default self signed certs
docker run -e COOKIE_NAME=SESSION_AFFINITY -e USE_SSL=true -e PORT=443 jmervine/unstick:latest
# Custom certs
docker run -e COOKIE_NAME=SESSION_AFFINITY -e USE_SSL=true -e PORT=443 \
-e SERVER_KEY=/usr/share/ssl/server.key -e SERVER_CRT=/usr/sahre/ssl/server.crt \
-v /path/to/ssl:/usr/share/ssl \
jmervine/unstick:latest
```