Thanks Anthony for the suggestion! I created a PR just now. 
https://github.com/web2py/web2py/pull/2233

Was wondering which place would be easier to draw the maintainers' 
attention, an issue/PR on github.com/web2py/web2py or a new post in this 
group/forum. :-)

Regards,
Ray

On Wednesday, July 17, 2019 at 2:44:53 PM UTC-7, Anthony wrote:
>
> Feel free to submit a pull request. Or just set scheme='https' if you know 
> it is HTTPS.
>
> Anthony
>
> On Tuesday, July 16, 2019 at 4:31:06 AM UTC-4, Ray (a.k.a. Iceberg) wrote:
>>
>> Hi there,
>>
>> I tend to use
>>
>> URL(..., scheme=True, ...)
>>
>> in my apps to generate an absolute URL, as documented here 
>> <http://web2py.com/books/default/chapter/29/04/the-core#Absolute-urls>.
>>
>> However, one of my app which has been deployed behind Apache wsgi with 
>> https, I noticed that the generated absolute URLs still use non-secure 
>> "http://...";.
>>
>> It is said that there can be some special situation that the wsgi 
>> setting would be inaccurate 
>> <https://stackoverflow.com/questions/43906350/djangos-request-meta-getwsgi-url-scheme-returns-http-instead-of-https>.
>>  
>> However my question here for web2py is, why URL(..., scheme=True, ...) 
>> is implemented to depend on wsgi_url_scheme ONLY 
>> <https://github.com/web2py/web2py/blob/R-2.18.3/gluon/rewrite.py#L207>, 
>> while the is_https is more sophisticated 
>> <https://github.com/web2py/web2py/blob/R-2.18.3/gluon/main.py#L366-L367>? 
>> And, why does URL(..., scheme=True, ...) NOT depend on the more 
>> sophisticated is_https instead?
>>
>> Regards,
>> Ray
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/01602063-ca30-4117-b8c7-bea4d102988b%40googlegroups.com.

Reply via email to