On Thu, Sep 10, 2026 at 3:21 AM Joe Orton <[email protected]> wrote:
>
> On Wed, Sep 09, 2026 at 01:51:54PM +0000, Cornel Isbiceanu via dev wrote:
> > Hi all,
> >
> > I'd like to propose a small addition to mod_env: a new SetEnvFromFile 
> > directive that reads internal environment variables from a file of 
> > name=value lines at configuration time, storing them in the same 
> > per-directory table used by SetEnv.
> >
> > PR (against trunk):
> > apache/httpd#750<https://github.com/apache/httpd/pull/750>
> >
> > Motivation: it lets operators keep a set of environment values in a 
> > separate, easily-generated/managed file (e.g. from deployment tooling)
> > instead of inlining many SetEnv lines in the server config. Values flow to 
> > r->subprocess_env exactly like SetEnv, so they reach CGI, SSI, logging, 
> > proxy backends, etc. unchanged. Because both write the same table, 
> > precedence follows configuration order (last writer wins), matching 
> > existing SetEnv behaviour.
> >
> > The file format is one name=value per line; blank lines and # comments
> > are ignored, whitespace is stripped, and relative paths resolve
> > against ServerRoot. It's read once at config parse time.
>
> Thanks for filing the PR! Seems like a nice feature.
>
> It's probably worth documenting that backslash continuation is respected
> in the files. You can credit yourself in the changes-entry file.
> Otherwise LGTM.
>
> Also if you don't mind burning some more tokens, a pyhttpd-based test
> would be preferred over the pytest_suite one (yes we should document
> that) - I just pushed another test to test/modules/metadata which would
> be the natural home for mod_env tests too.


Any issue with it allowing unintended files via .htaccess that have
some content matching the format ?  Seems like the kind of thing we'd
get reports on.
Maybe a new AllowOverride type?

Reply via email to