[albatross-users] How to get https protocol from al-a tags?
Sheila King
sheila at thinkspot.net
Tue Jan 13 10:14:16 EST 2004
--On Monday, January 12, 2004 5:16 PM -0500 "Michael C. Neel"
<neel at mediapulse.com> wrote:
> In the app.py is the lines:
>
> def redirect_url(self, loc):
> new_base = self.absolute_base_url()
> return urlparse.urlunparse(('http',
> self.request.get_servername(),
> new_base + loc, '', '', ''))
>
> where it's going on. You could change the http to https, but really
> IMHO albatross shouldn't be putting http(s) and servername into a url,
> prefixing with '/' at the beginning is a lot easier to move between
> sites. I've also done sites with wildcards for dns and servername, and
> this would be a problem here too. I don't know what the gain is for
> building the full url, so there maybe a reason to have it, but changing
> it to:
>
> def redirect_url(self, loc):
> return self.absolute_base_url() + loc
>
> should solve your problem, but that's untested so you may need to test
> it a bit. Also if you add a ?dummy=1 to the end of your href, I think
> albatross won't try to put in the full url - that or use expr instead as
> I don't think it will do the full url either. I'm not 100% because I
> rarely use this tag.
>
> Mike
Thanks, heaps, Mike. I quickly patched this change in, and it seems to be
working as desired. And yes, I do want to be able to switch between sites,
some of which have http and some of which have https, so flexibility is
important.
I sure would like to see this flexibility incorporated into the next
Albatross patch/version.
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org
>> -----Original Message-----
>> From: Sheila King [mailto:sheila at thinkspot.net]
>> Sent: Monday, January 12, 2004 4:44 PM
>> To: albatross-users at object-craft.com.au
>> Subject: [albatross-users] How to get https protocol from al-a tags?
>>
>>
>> OK, I'm moving an albatross app I've been using under http
>> for a while to
>> https. And I had hoped this would simply require moving the
>> appropriate
>> files to the proper directory on my web server and adjusting
>> a path or two.
>>
>> However, it does appear that the al-a tags always produce
>> links to http and
>> not to https even if the referring/current page is https.
>>
>> How to fix this?
>>
>> Is there an easy/quick thing I can do to my albatross files?
>> I'm looking at
>> tags.py and it is not clear to me what code I could/should
>> change there for
>> this effect?
>>
>> I'm kinda bummed, cuz I already paid to have SSL set up on my
>> web site, and
>> now it appears that it may not work with albatross.
>> :/
>>
>> suggestions?
>>
>> --
>> Sheila King
>> http://www.thinkspot.net/sheila/
>> http://www.k12groups.org
More information about the Albatross-users
mailing list