summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLia Lenckowski <lialenck@protonmail.com>2023-10-01 23:10:44 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-04 14:26:52 +0200
commit03ede96a06262aa1fa647f4d26a1a517c33c2103 (patch)
tree46608255b437187e9b1f858d72cf2112327a5b3f
parent2d7fefd820530080002a063acf9b0a2501c6725b (diff)
downloadgnix-03ede96a06262aa1fa647f4d26a1a517c33c2103.tar
gnix-03ede96a06262aa1fa647f4d26a1a517c33c2103.tar.bz2
gnix-03ede96a06262aa1fa647f4d26a1a517c33c2103.tar.zst
fix the example for 1.0.0
Signed-off-by: metamuffin <metamuffin@disroot.org>
-rw-r--r--readme.md24
1 files changed, 12 insertions, 12 deletions
diff --git a/readme.md b/readme.md
index ec25d31..174ca5a 100644
--- a/readme.md
+++ b/readme.md
@@ -15,22 +15,22 @@ Run the binary with the a path to the configuration as the first argument. The
configuration file is written in TOML and could look like this:
```toml
-# Both the [http] and [https] sections are optional
-[http]
-# the value for 'bind' can either be a string or a list of strings
-bind = [ "127.0.0.1:8080", "[::1]:8080" ]
+# Both the 'http' and 'https' sections are optional
+http:
+ # the value for 'bind' can either be a string or a list of strings
+ bind: [ "127.0.0.1:8080", "[::1]:8080" ]
-[https]
-bind = "127.0.0.1:8443"
-tls_cert = "ssl/cert.pem"
-tls_key = "ssl/key.pem" # only accepts pkcs8 for now
+https:
+ bind: "127.0.0.1:8443"
+ tls_cert: "ssl/cert.pem"
+ tls_key: "ssl/key.pem" # only accepts pkcs8 for now
# this is a lookup table from hostnames to backend address
# in this case, requests for `testdomain.local` are forwarded to 127.0.0.1:3000
-[hosts]
-"testdomain.local" = { backend = "127.0.0.1:3000" }
-"secondomain.local" = { backend = "1.2.3.4:5678" }
-"static.testdomain.local" = { files = { root = "/srv/http", index = true } }
+hosts:
+ testdomain.local: { backend: "127.0.0.1:3000" }
+ secondomain.local: { backend: "1.2.3.4:5678" }
+ static.testdomain.local: { files: { root: "/srv/http", index: true } }
```
The configuration can either be specify a backend to forward to or the `files`