:param string name: is the name of the action.
:param table actions: is a table of string describing the HAProxy actions
facilities where to expose the new action. Expected facilities are:
- 'tcp-req', 'tcp-res', 'http-req' or 'http-res'.
+ 'tcp-req', 'tcp-res', 'http-req', 'http-res', 'http-after-res'.
:param function func: is the Lua function called to work as an action.
:param integer nb_args: is the expected number of argument for the action.
By default the value is 0.
akw = action_http_req_custom(trash->area);
} else if (strcmp(lua_tostring(L, -1), "http-res") == 0) {
akw = action_http_res_custom(trash->area);
+ } else if (strcmp(lua_tostring(L, -1), "http-after-res") == 0) {
+ akw = action_http_after_res_custom(trash->area);
} else {
akw = NULL;
}
http_req_keywords_register(akl);
else if (strcmp(lua_tostring(L, -1), "http-res") == 0)
http_res_keywords_register(akl);
+ else if (strcmp(lua_tostring(L, -1), "http-after-res") == 0)
+ http_after_res_keywords_register(akl);
else {
release_hlua_function(fcn);
hlua_unref(L, ref);
ha_free((char **)&(akl->kw[0].kw));
ha_free(&akl);
WILL_LJMP(luaL_error(L, "Lua action environment '%s' is unknown. "
- "'tcp-req', 'tcp-res', 'http-req' or 'http-res' "
+ "'tcp-req', 'tcp-res', 'http-req', 'http-res' "
+ "or 'http-after-res' "
"are expected.", lua_tostring(L, -1)));
}