diff mod_authz_delegate/mod_authz_delegate.lua @ 6407:6ebda1e5b4f3

mod_authz_delegate: Ruse parent host logic from mod_authz_internal
author Kim Alvefur <zash@zash.se>
date Wed, 18 Feb 2026 16:34:37 +0100
parents 98d5acb93439
children
line wrap: on
line diff
--- a/mod_authz_delegate/mod_authz_delegate.lua	Wed Feb 18 16:30:18 2026 +0100
+++ b/mod_authz_delegate/mod_authz_delegate.lua	Wed Feb 18 16:34:37 2026 +0100
@@ -1,4 +1,6 @@
-local target_host = assert(module:get_option("authz_delegate_to"));
+local host = module.host;
+local host_suffix = module:get_option_string("parent_host", (host:gsub("^[^%.]+%.", "")));
+local target_host = module:get_option("authz_delegate_to", host_suffix);
 local this_host = module:get_host();
 
 local array = require"util.array";