forge
Explore
Log in

Don't you dare go Hollow

📝 deploy: Ferron example in ferron.conf form with buffering off

Browse files at this commit

849ec008f14c20919e2d9f832fa443f896337787Ahmet Kaan GümüşParent: cddb939
README.mdmodified+1 -1
@@ -183,7 +183,7 @@ systemctl daemon-reload
183 systemctl enable --now im183 systemctl enable --now im
184 ```184 ```
185 185
186-Put a TLS-terminating reverse proxy in front of it. `deploy/ferron.kdl` is an example Ferron site that186+Put a TLS-terminating reverse proxy in front of it. `deploy/ferron.conf` is an example Ferron site that
187 forwards to `127.0.0.1:7650`; `base_url` must be the same public origin. Three things matter in the proxy:187 forwards to `127.0.0.1:7650`; `base_url` must be the same public origin. Three things matter in the proxy:
188 188
189 - Redirect plain HTTP to HTTPS. `im` sends HSTS itself when `base_url` is `https://`.189 - Redirect plain HTTP to HTTPS. `im` sends HSTS itself when `base_url` is `https://`.
deploy/ferron.confadded+20 -0
@@ -0,0 +1,20 @@
1+# Ferron reverse proxy for im. Same format as the forge and iz examples (ferron.conf, not KDL).
2+# Replace im.example.com with the public host name (base_url in /etc/im/im.toml must match it).
3+# A bare host block gets automatic TLS.
4+#
5+# The proxy sends X-Forwarded-For for the client. im reads that header only from peers listed in
6+# trusted_proxies; with Ferron on the same machine the peer is 127.0.0.1, so set
7+# trusted_proxies = ["127.0.0.1/32"] in im.toml. Left empty, every visitor counts as 127.0.0.1 and one
8+# visitor's failures throttle everyone.
9+#
10+# Buffering is off because the live update streams (server-sent events) must reach the browser
11+# as they are written.
12+#
13+# Keep /reset/, /invite/ and /email/ out of the access log: those paths carry tokens that grant access.
14+im.example.com {
15+ buffer_request 0
16+ buffer_response 0
17+ proxy {
18+ upstream http://127.0.0.1:7650
19+ }
20+}
deploy/ferron.kdldeleted+0 -9
@@ -1,9 +0,0 @@
1-// Example Ferron site for `im`. Ferron terminates TLS and forwards to the loopback listener of `im`.
2-// Check the directive names against the Ferron version you run; this file shows the shape, it has not been
3-// run against a live Ferron here. `base_url` in im.toml must be this same origin, and `trusted_proxies`
4-// must be ["127.0.0.1/32"]. In the real site also: redirect HTTP to HTTPS, do not buffer responses (the
5-// live streams need it), append the client to X-Forwarded-For, and keep /reset/, /invite/ and /email/ paths
6-// out of the access log: they carry one-time tokens.
7-im.example.com {
8- proxy http://127.0.0.1:7650
9-}