opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
810 stars 593 forks source link

www/caddy: Fix IPv6 address + Port combination in Caddyfile template #4054

Closed Monviech closed 1 day ago

Monviech commented 6 days ago

Fixes: https://forum.opnsense.org/index.php?topic=41203

Before the fix:

handle @66b595d6-ed36-458b-83a4-b48fecb89416 {
        handle {
            reverse_proxy 192.168.1.1:81 2003::1:81 example.com:81 fd00:00::1:81 {
            }
        }
    }

After the fix:

handle @66b595d6-ed36-458b-83a4-b48fecb89416 {
        handle {
            reverse_proxy 192.168.1.1:81 [2003::1]:81 example.com:81 [fd00:00::1]:81 {
            }
        }
    }