TW not picking up on HTTPS

22 views
Skip to first unread message

Stuart Zurcher

unread,
Jun 26, 2015, 12:32:05 PM6/26/15
to turbo...@googlegroups.com
I am redirecting Myprofile to HTTPS via nginx.  Images, css, js in the templates return https links, however, tw form sends http://domain/tw2/resources/tw2.forms/static/forms.css breaking the security of the site.  Any one else have this problem? Solutions?

Michael Pedersen

unread,
Jul 9, 2015, 7:13:12 AM7/9/15
to turbo...@googlegroups.com
The times that I have seen this, the web server itself was behind a reverse proxy that used an HTTP connection instead of HTTPS between the proxy and the web server. What I would do to fix it is change the web proxy to use HTTPS. I also think that upgrading TW to the latest version will help, but am not positive on that count.

On Fri, Jun 26, 2015 at 12:32 PM Stuart Zurcher <stuart...@gmail.com> wrote:
I am redirecting Myprofile to HTTPS via nginx.  Images, css, js in the templates return https links, however, tw form sends http://domain/tw2/resources/tw2.forms/static/forms.css breaking the security of the site.  Any one else have this problem? Solutions?

--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+...@googlegroups.com.
To post to this group, send email to turbo...@googlegroups.com.
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Alessandro Molina

unread,
Jul 10, 2015, 11:19:37 AM7/10/15
to TurboGears
That's actually curious as TW2 injects resources as relative paths, without domain or schema being specified.
So it should actually end up serving them from the same domain and schema you are using for the webpage itself as it is the browser itself in charge of deciding the qualified url.

Stuart Zurcher

unread,
Jul 10, 2015, 11:32:18 PM7/10/15
to turbo...@googlegroups.com
That was my sentiment also. I use tg.url() for my js and CSS which work while the tw form does not catch the HTTPS scheme. I have not had the time yet to dig into why. I'm just doing a proxypass with nginx. I can post the proxy params on Monday.

Stuart Zurcher

unread,
Jul 14, 2015, 4:16:43 PM7/14/15
to turbo...@googlegroups.com
nginx params

proxy_redirect          off;
proxy_set_header        Host $host;
proxy_set_header        X-Real-IP $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header        X-Forwarded-Proto $scheme;
proxy_read_timeout      90;


Reply all
Reply to author
Forward
0 new messages