On Mon, Sep 10, 2012 at 08:41:49PM +0200, Guillaume Castagnino wrote:
> Hi list,
> 
> Currently, I'm using a nginx configuration to do protocol upgrade, from 
> plain HTTP to HTTPS, basically, on port 80 I have a redirect that catch 
> all virtual hosts and just upgrade the protocol, keeping the host and 
> request untouched. It looks like this:
>       rewrite ^ https://$host$request_uri? permanent;
> 
> Is there a way to do this only with haproxy without involving some http 
> server configuration in the backend ?
> In other words, is there a way to do something like this (with 1.5-
> dev12) without hardcoding any domain so that a single rule may match any 
> virtual host, extracting the domain from the original request:
>       redirect prefix https://$hdr_dom code 301

I think it's time to add "redirect scheme" which would recompose the Location
header from this scheme, the Host header and the URI. I'm going to look into
this.

Regards,
Willy


Reply via email to