Attribute Macro host_filter

Source
#[host_filter]
Expand description

Filters requests that have no host header.

This attribute macro ensures the decorated function only executes when the incoming request has a host header present. Requests without a host header will be filtered out.

ยงUsage

use hyperlane::*;
use hyperlane_macros::*;

#[host_filter("example.com")]
async fn handle_with_host(ctx: Context) {
    // Function body for requests with host header
}

The macro takes no parameters and should be applied directly to async functions that accept a Context parameter.