captures in regex locations

Igor Sysoev is at rambler-co.ru
Thu Mar 5 01:17:45 MSK 2009


On Wed, Mar 04, 2009 at 11:00:48PM +0100, Adrian Perez de Castro wrote:

> On Thu, 5 Mar 2009 00:40:58 +0300
> Igor Sysoev <is at rambler-co.ru> wrote:
> 
> > On Wed, Mar 04, 2009 at 01:34:35PM -0800, Merlin wrote:
> > 
> > > Igor,
> > > 
> > > This is awesome, and I look forward to playing with it.  I assume
> > > this is presented as a patch for testing but is planned to be
> > > released at some point later, correct?  Regardless, keep up the
> > > great work!
> > 
> > Yes, I plan to include t in 0.7.40.
> 
> This is great news, this feature will make some of my Nginx config
> files a lot simpler!

Probably to simplfy configuration even more I will make the "match" directive

    match  $http_destination  ^https?(:.+)$;

    proxy_set_header   Destination     http$1;

as replacement to

    set  $destination  $http_destination;

    if ($http_destination ~* ^https(.+)$) {
        set  $destination  $http$1;
    }

    proxy_set_header   Destination     $destination;


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list