Use $Restrict

parent 4f74d404
...@@ -13,12 +13,7 @@ vmod_is_esi(VRT_CTX) ...@@ -13,12 +13,7 @@ vmod_is_esi(VRT_CTX)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if ((ctx->method & VCL_MET_DELIVER) == 0) { assert(ctx->method == VCL_MET_DELIVER);
VRT_fail(ctx, "objesi.is_esi may only be called from "
"vcl_deliver {}");
return (0);
}
req = ctx->req; req = ctx->req;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
......
...@@ -28,7 +28,7 @@ $Function BOOL is_esi() ...@@ -28,7 +28,7 @@ $Function BOOL is_esi()
Return true if ESI processing is active. Return true if ESI processing is active.
May only be called from ``vcl_deliver {}``. $Restrict vcl_deliver
SEE ALSO SEE ALSO
========vcl\(7),varnishd\(1) ========vcl\(7),varnishd\(1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment