[Zope] https://zope/manage

ethan mindlace fremen mindlace@imeme.net
Tue, 22 Feb 2000 08:48:13 +0000


> From: ethan mindlace fremen <mindlace@imeme.net>
> > I'm trying to get all the manage pages to be secure

the following in an Access Rule should do the trick regardless of other
virtualhosting:

extract the base name requested:
<dtml-let basename="_.string.join(_.string.split(HTTP_HOST, ':')[-2:])">
look for manage, then munge the result to be 0 if not found:
<dtml-if "1+(_.string.find(PATH_INFO, 'manage'))">
Make secure base:
<dtml-call "REQUEST.set('SiteRootBASE','https://'+basename)">
<dtml-else>
Leave it insecure:
<dtml-call "REQUEST.set('SiteRootBASE','http://'+basename)">
</dtml-if>
</dtml-let>

It still behaves kinda funny if you ask for manage without specifying
https:// from the beginning, but I think you could get around this with
a rewrite rule in Your Favorite Web Server.

Ethan Fremen
http://imeme.net