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 web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/f495a9c3-97c7-4e02-a3e0-f1429b266729%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.