From b1874898028aa584bb02c3ec082ab8c9f54ae951 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 15 Jan 2022 15:13:41 +0100 Subject: mod_http: Limit unencrypted http port (5280) to loopback by default Since accessing this port directly over the wider Internet is unlikely to intentional anymore. Most uses will likely be by reverse proxies, by mistake or because of trouble configuring HTTPS. Blocking mistaken uses is just a good thing, letting users send potentially private things unencrypted tends to be Strongly Discouraged these days. Many reverse proxy setups operate over loopback, so listening there instead of all interfaces is a net improvement. Improved automatic certificate location and SNI support has mostly eliminated the need for manual certificate configuration so HTTPS should Just Work once certificates have been provided. For local testing during development, connecting over loopback is likely fine as well. When really needed, `http_interfaces` can still be set. Suggested by Link Mauve --- plugins/mod_http.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/mod_http.lua') diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index 100581b5..c7795089 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -304,6 +304,7 @@ end); module:provides("net", { name = "http"; listener = server.listener; + private = true; default_port = 5280; multiplex = { pattern = "^[A-Z]"; -- cgit v1.2.3