We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c592ca9 commit e512202Copy full SHA for e512202
ngxpp/NgxModule.hpp
@@ -86,6 +86,17 @@ class NgxModuleConfig final
86
return get<T3>(ctx(cf)->loc_conf);
87
}
88
89
+public:
90
+ // cycle->conf_ccycle->conf_ctxtx[ngx_http_module.index] must not null
91
+ META_TYPE(T1) main(ngx_cycle_t* cycle) const
92
+ {
93
+ return get<T1>(ctx(cycle)->main_conf);
94
+ }
95
+
96
+ ngx_http_conf_ctx_t* ctx(ngx_cycle_t* cycle) const
97
98
+ return reinterpret_cast<ngx_http_conf_ctx_t*>(cycle->conf_ctx[ngx_http_module.index]);
99
100
private:
101
ngx_http_conf_ctx_t* ctx(ngx_conf_t* cf) const
102
{
0 commit comments