staticngx_int_tngx_conf_add_dump(ngx_conf_t*cf,ngx_str_t*filename){off_tsize; u_char *p;uint32_thash;ngx_buf_t*buf;ngx_str_node_t*sn;ngx_conf_dump_t*cd; hash = ngx_crc32_long(filename->data, filename->len); sn = ngx_str_rbtree_lookup(&cf->cycle->config_dump_rbtree,...
*/ #include <ngx_config.h> #include <ngx_core.h> #define NGX_CONF_BUFFER 4096 static ngx_int_t ngx_conf_add_dump(ngx_conf_t *cf, ngx_str_t *filename); static ngx_int_t ngx_conf_handler(ngx_conf_t *cf, ngx_int_t last); static ngx_int_t ngx_conf_read_token(ngx...
}ngx_memzero(cycle->paths.elts, n *sizeof(ngx_path_t *));if(ngx_array_init(&cycle->config_dump, pool,1,sizeof(ngx_conf_dump_t)) != NGX_OK) {ngx_destroy_pool(pool);returnNULL; }/* 初始化一棵红黑树 config_dump_rbtree */ngx_rbtree_init(&cycle->config_dump_rbtree, &cycle...
示例1: ngx_conf_flush_files ▲点赞 9▼ staticvoidngx_conf_flush_files(ngx_cycle_t*cycle){ssize_tn, len;ngx_uint_ti;ngx_list_part_t*part;ngx_open_file_t*file; ngx_log_debug0(NGX_LOG_DEBUG_CORE, cycle->log,0,"flush files"); ...
ngx_queue_add(h, n) //获取队列的中间节点 ngx_queue_t *ngx_queue_middle(ngx_queue_t *queue) //排序队列(稳定的插入排序) void ngx_queue_sort(ngx_queue_t *queue,ngx_int_t (*cmp)(const ngx_queue_t*, const ngx_queue_t*)) 其中,插入节点、取队列头、取队列尾等操作由宏实现,获取中间...
static ngx_rtmp_variable_t *ngx_rtmp_add_prefix_variable(ngx_conf_t *cf, ngx_str_t *name, ngx_uint_t flags); static ngx_int_t ngx_rtmp_variable_request(ngx_rtmp_session_t *s, ngx_rtmp_variable_value_t *v, uintptr_t data); ...
默认防御规则在wafconf目录中,摘录几条核心的SQL注入防御规则: select...0x01 环境搭建 github源码:https://github.com/loveshell/ngx_lua_waf/ ngx_lua_waf安装部署,设置反向代理访问构造的SQL注入点 0x02 WAF...测试 ngx_lua_waf是基于ngx_lua的,我们先通过一个测试用例来了解它是如何获取参数的。...首先...
Directives ssl ssl_buffer_size ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_conf_command ssl_crl ssl_dhparam ssl_early_data ssl_ecdh_curve ssl_ocsp ssl_ocsp_cache ssl_ocsp_responder ssl_password_file ssl_prefer_server_ciphers ssl_protocols ssl_reject_handshake ssl_se...
hc->addr_conf = &addr[0].conf;break; } }/*the default server configuration for the address:port*///listen add:port对于的 server{}配置块的上下文ctxhc->conf_ctx = hc->addr_conf->default_server->ctx; ctx= ngx_palloc(c->pool,sizeof(ngx_http_log_ctx_t));if(ctx ==NULL) { ...