#[tls]Expand description
Restricts function execution to TLS-encrypted requests only.
This attribute macro ensures the decorated function only executes for requests that use TLS/SSL encryption on the connection.
ยงUsage
use hyperlane::*;
use hyperlane_macros::*;
#[route("/tls")]
struct Tls;
impl ServerHook for Tls {
async fn new(_ctx: &Context) -> Self {
Self
}
#[prologue_macros(tls, response_body("tls"))]
async fn handle(self, ctx: &Context) {}
}The macro takes no parameters and should be applied directly to async functions
that accept a &Context parameter.