You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,13 @@
4
4
[⬇️How to install⬇️](#installation)
5
5
6
6
## Features
7
-
-**Path-based Redirection:** Reads a config file that maps paths to redirect URLs. When a request hits a registered path, the router issues an HTTP redirect to the corresponding target.
7
+
-**Path-based Redirection:** Reads a config file that maps paths to redirect URLs. When a request hits a registered path, the router issues an HTTP redirect to the corresponding target.
8
8
-**Hot Reloading:** The config is cached at startup and automatically reloaded when the file changes — no restart required. [Example config](#example-config)
9
9
-**Low Resource Usage:** Uses less than 50MB of RAM, making it ideal for constrained environments.
10
10
-**Metrics Endpoint:** Exposes Prometheus-compatible metrics at `:5000/metrics` for easy observability and monitoring. [How to use](#metrics)
11
-
-**Docker-Deployable:** Comes with a minimal Dockerfile for easy containerized deployment.
11
+
-**Docker-Deployable:** Comes with a minimal Dockerfile for easy containerized deployment.
12
+
-**Placeholders:** Supports placeholders in redirect URLs, allowing dynamic URL generation based on the requested path. For example, a route defined as `/user/{username}` can redirect to `https://example.com/profile/{username}`, where `{username}` is replaced with the actual value from the request.
13
+
-**Status Code:** You are able to configure if the redirect should redirect to an url or just return a custom status code of your choice. Example `"RedirectUrl": "-> 418"` will return the status code 418 (I'm a teapot :) )
12
14
13
15
## Configuration
14
16
Routes are managed via a configuration file, `/data/config.json`. You can define paths and their corresponding URLs in this file. The application automatically normalizes routes to handle both trailing and non-trailing slashes.
@@ -24,11 +26,15 @@ Routes are managed via a configuration file, `/data/config.json`. You can define
24
26
"Routes": [
25
27
{
26
28
"Route": "/instagram", // has to start with a slash
0 commit comments