/ Zope / Apsis / Pound Mailing List / Archive / 2005 / 2005-09 / Rewrite redirect locations?

[ << ] [ >> ]

[ Client certificates / "Matthew Bennetts ... ] [ Syslog.conf / Will Tatam <wtatam(at)premierit.c... ]

Rewrite redirect locations?
Rob Moore <rmoore(at)performanceretail.com>
2005-09-14 18:43:33 [ FULL ]
I am trying to use Pound to front a web application on Tomcat and have 
run into a bit of a problem. Basically, I'm using a security framework 
that creates a redirect to a login page when a user first requests a 
page without a session. The code does the right thing in terms of 
HTTP/1.1 -- that is, it provides an absolute URI for the login page. 
However, the absolute URI contains the http scheme rather than the https 
scheme. I was wondering if there is a way to tell Pound to rewrite this 
location URI to use the https scheme instead. I thought that 
RewriteRedirect would handle this, but it doesn't seem to do the job.

Thanks,

Rob
Attachments:  
rmoore.vcf text/x-vcard 280 Bytes

Re: [Pound Mailing List] Rewrite redirect locations?
Rob Moore <rmoore(at)performanceretail.com>
2005-09-16 18:21:45 [ FULL ]
I researched this issue some more on the mail archive after sending out 
my initial post and came to conclusion that Pound should rewrite the 
http to https if it finds that the IP of the host in the Location field 
is one that it's listening on.  I have the following configuration:

ListenHTTPS 1.1.3.138,443 /etc/pound/pound.pem

UrlGroup ".*"

BackEnd 127.0.0.1,8080,1

EndGroup

and am using a URL without a explicit port value 
(https://x.example.com/myApp).

While reading the docs, I came across the "RewriteRedirect 2" option 
that "ignores port value for host matching" and thought it might have 
something to do with my issue since no port is specified. It sounded 
like a shot in the dark, but I tried it and, voila, it worked. I thought 
I would pass this along in case anyone else comes across a similar issue.

Regards,

Rob

Rob Moore wrote:
[...]
Attachments:  
rmoore.vcf text/x-vcard 280 Bytes

MailBoxer