You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extending the ngx::http::module::HTTPModule trait is also a viable option.
An important thing to consider is that the module configs can be obtained from ngx_cycle_t, ngx_conf_t, ngx_http_request_t or ngx_http_upstream_t objects and all of those should provide safe accessors.
The text was updated successfully, but these errors were encountered:
There's a certain unsafe pattern that is repeated in most of the examples:
The problems here are:
ngx_http_curl_module
is a global mutable static, requiringunsafe
for any access.Something we can optimize here is to tie config type to a context type and to a module ptr, and hide most of the unsafe details from end user.
E.g.
or with an opposite direction of the mapping
Extending the
ngx::http::module::HTTPModule
trait is also a viable option.An important thing to consider is that the module configs can be obtained from
ngx_cycle_t
,ngx_conf_t
,ngx_http_request_t
orngx_http_upstream_t
objects and all of those should provide safe accessors.The text was updated successfully, but these errors were encountered: