https://github.com/creekorful/direktion
Very-simple & idiomatic URL forwarder.
https://github.com/creekorful/direktion
golang http-server redirections redirects url-forwarding
Last synced: 3 months ago
JSON representation
Very-simple & idiomatic URL forwarder.
- Host: GitHub
- URL: https://github.com/creekorful/direktion
- Owner: creekorful
- License: gpl-3.0
- Created: 2021-03-11T17:34:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-18T06:58:52.000Z (over 4 years ago)
- Last Synced: 2024-05-23T05:01:22.218Z (about 1 year ago)
- Topics: golang, http-server, redirections, redirects, url-forwarding
- Language: Go
- Homepage: https://hub.docker.com/r/creekorful/direktion
- Size: 32.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# direktion
Very-simple & idiomatic HTTP URL rewriter.
## How to use it?
Create a `direktion.json` config file where you want, with your redirections:
```json
{
"redirects": {
"example.com/blog": {
"location": "https://blog.example.org/$request_uri",
"code": 307
},
"example.com": {
"location": "https://example.org",
"code": 307
},
"www.example.com": {
"location": "https://example.org",
"code": 308
}
},
"use_x_forwarded": false
}
```and then execute direktion: `./direktion --config `
nb: if `use_x_forwarded` is true, then direktion will use the `X-Forwarded*` headers to determinate remote IP address. (
should only enabled if behind trusted reverse proxy)