traeak commented on code in PR #13160:
URL: https://github.com/apache/trafficserver/pull/13160#discussion_r3289852337


##########
plugins/experimental/maxmind_acl/mmdb.cc:
##########
@@ -429,6 +434,42 @@ Acl::parseregex(const YAML::Node &regex, bool allow)
   }
 }
 
+void
+Acl::loadbypass(const YAML::Node &bypassNode)
+{
+  if (!bypassNode) {
+    Dbg(dbg_ctl, "No bypass set");
+    return;
+  }
+  if (bypassNode.IsNull()) {
+    Dbg(dbg_ctl, "bypass node is NULL");
+    return;
+  }
+
+  try {
+    if (bypassNode["header"]) {
+      if (!bypassNode["value"]) {
+        TSWarning("[%s] bypass 'header' set without 'value' — bypass disabled; 
both are required", PLUGIN_NAME);
+        return;
+      }
+      _bypass_header_value = bypassNode["value"].as<std::string>();
+      if (_bypass_header_value.empty()) {
+        TSWarning("[%s] bypass 'value' is empty — bypass disabled; a non-empty 
value is required", PLUGIN_NAME);
+        return;
+      }
+      _bypass_header = bypassNode["header"].as<std::string>();

Review Comment:
   while technically this is legit i don't see how this intentional 
misconfiguration would work as I don't think there's any way to specify an 
empty http header.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to