On 04/18/2013 05:09 PM, Igor Galić wrote: > > Hey folks o/~ > > From an IRC conversation in #httpd and #httpd-dev emerged the > idea to interpolate %{variables} in all directives. > According to sf we have somewhere a ~10 line code fragment > which does that without much overhead (not benchmarked) when > interpolating and with hardly any (short-circuit) when not. > > I think it would be a good idea to allow for this to be used > in all directives (across all modules) it makes for immensly > more readable configurations because: > > Example: > > # default vhost redirecting every HTTP vhost to HTTPS: > <VirtualHost *:80> > Redirect / https://%{HTTP_HOST}/ > </VirtualHost> > > > Another example might be something "more advanced" like: > > # group specific authorization: > <LocationMatch "^/(?P<group>[^/]+).*"> > Require group %{group} > </Location> > >
I'm for interpolating in as many places as makes sense, but I'm probably not for interpolating eeeeverywhere at once, since that could lead to clashes and unwanted results. Interpolation should be enabled in each module that wants to use this, and not via a blanket config change (this probably isn't viable/possible anyway), but I'm definitely for using it in areas such as Redirect*, Location*, Header* and possibly Require (although that one might be a tad difficult and would have to be implemented locally in each individual auth module I suspect). So, +1 to the general idea, but I think it would/should be enabled 'manually' in each module, and not some attempt to just make it all switch at once. Perhaps we could start with Redirect*? With regards, Daniel.