Hi,

are there any objections for adding ::1 to the LOCALHOST acl? See attached patch...

Björn
>From 5dcb29346e65549afdaaa035468f8d9d8c9c23ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <[email protected]>
Date: Fri, 15 Oct 2021 16:32:15 +0200
Subject: [PATCH] MINOR: add ::1 to predefined LOCALHOST acl

---
 doc/configuration.txt | 2 +-
 src/acl.c             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/configuration.txt b/doc/configuration.txt
index e58d6d3e2..032ac8227 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -20638,7 +20638,7 @@ HTTP_CONTENT     req.hdr_val(content-length) gt 0   match an existing content-le
 HTTP_URL_ABS     url_reg ^[^/:]*://                 match absolute URL with scheme
 HTTP_URL_SLASH   url_beg /                          match URL beginning with "/"
 HTTP_URL_STAR    url     *                          match URL equal to "*"
-LOCALHOST        src 127.0.0.1/8                    match connection from local host
+LOCALHOST        src 127.0.0.1/8 ::1                match connection from local host
 METH_CONNECT     method  CONNECT                    match HTTP CONNECT method
 METH_DELETE      method  DELETE                     match HTTP DELETE method
 METH_GET         method  GET HEAD                   match HTTP GET or HEAD method
diff --git a/src/acl.c b/src/acl.c
index 6d11a0b35..480dd11a8 100644
--- a/src/acl.c
+++ b/src/acl.c
@@ -754,7 +754,7 @@ const struct {
 } default_acl_list[] = {
 	{ .name = "TRUE",           .expr = {"always_true",""}},
 	{ .name = "FALSE",          .expr = {"always_false",""}},
-	{ .name = "LOCALHOST",      .expr = {"src","127.0.0.1/8",""}},
+	{ .name = "LOCALHOST",      .expr = {"src","127.0.0.1/8","::1",""}},
 	{ .name = "HTTP",           .expr = {"req.proto_http",""}},
 	{ .name = "HTTP_1.0",       .expr = {"req.ver","1.0",""}},
 	{ .name = "HTTP_1.1",       .expr = {"req.ver","1.1",""}},
-- 
2.25.1

Reply via email to