Welcome! Log In Create A New Profile

Advanced

Re: Any way for a module to set directives when it's loaded?

Maxim Dounin
June 16, 2020 09:00AM
Hello!

On Mon, Jun 15, 2020 at 10:52:20AM -0700, Ryan Burn wrote:

> Suppose I'm writing an nginx module foo. Is there any way to have foo
> set default directives when it gets loaded?
>
> For example, if I wanted foo to add headers to every request could I have
>
> load_module modules/ngx_http_foo_module.so;
>
> implicitly add
>
> proxy_set_header foo-header bar-value;
> ...
>
> to the http context?

No, this is not something possible. Consider instructing your
module users to add relevant proxy_set_header directives to the
configuration instead.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Any way for a module to set directives when it's loaded?

rnburn 56 June 15, 2020 01:54PM

Re: Any way for a module to set directives when it's loaded?

Maxim Dounin 16 June 16, 2020 09:00AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 76
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready