From 593018bf4b78b38a429235dffc560c3c15272adf Mon Sep 17 00:00:00 2001 From: Ruby Nealon Date: Fri, 11 Oct 2024 20:00:23 +0900 Subject: [PATCH] add httpd.conf example to redirect 80 to 443 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 68e2153..58759db 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,17 @@ rc_reload=NO rc_cmd $1 ``` +`rubyshd` doesn't support plaintext HTTP, so you may also want to redirect HTTP traffic on that port to 443. An example [`httpd.conf(5)`](https://man.openbsd.org/httpd.conf.5) + +``` +server "ruby.sh" { + listen on * port 80 + location * { + block return 301 "https://$HTTP_HOST$REQUEST_URI" + } +} +``` + ## Future work - Better tests and CI