On Feb 8, 2011, at 11:41 AM, David J. wrote:
>
> Well than maybe someone could inform them; ;)
>
> It would be useful; My current work around is to make the whole site secure
> cringe;
If you know that the host info is valid, you could write:
'https://%s%s' % (request.env.http_host, URL("function"))
web2py has no guarantee of knowing the host name; that depends on how it's
deployed (consider the case of a proxy).
>
>
> On 2/8/11 2:36 PM, Massimo Di Pierro wrote:
>> Because the URL function does not know the "https://example.com". Only
>> the web server knows it.
>>
>> We do have a URL(,sign=....) option to digitally sign URLs.
>>
>> On Feb 8, 12:58 pm, "David J."<[email protected]> wrote:
>>> I was wondering why URL does not include a secure flag?
>>>
>>> I think it should be able to set "secure" url's
>>>
>>> For example if you do URL("function",secure=True)
>>>
>>> We generate a complete URL
>>>
>>> https://example.com/welcome/default/function
>