[ckan-dev] site login and logouts drop to http when connecting over SSL
hoechee yam
yam.hoechee at gmail.com
Wed Aug 10 04:50:09 UTC 2016
Turns out you need to add this chunk of code to your apache.wsgi file in
/etc/ckan/default/apache.wsgi
environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME', 'https')
return _application(environ, start_response)
Now it's redirecting all requests to https
Cheers,
Andie
On Tuesday, 9 August 2016, hoechee yam <yam.hoechee at gmail.com> wrote:
> Has anyone come across scenarios where user login and logouts drops to
> port 80 (http) even though I've configured my load balancer to only listen
> to port 443 (https)?
>
> I've followed all the steps here - https://github.com/ckan/ckan/wiki/SSL.
>
> My site starts from https://mysite.com
> But when I try to logout/login, it tries to reach
> http://mysite.com/user/login?came_from=/user/logged_in
> After a while, my browser's connection is reset with a grey screen.
> I can tell that I'm logged in because i can get to
> https://mysite.com/dashboard, but only if i enter the url manually after
> the connection reset
>
> One thing I took note is that my SSL certs are already given at the load
> balancer level. (we're using AWS)
> I"m not sure giving the SSL cert and key again on NGINX config would work.
>
> This whole SSL configuration is new to me, so i'm not sure where to look
> for answers.
> Would really appreciate if anyone have any answers here.
>
> Thanks!
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160810/28c1fcf8/attachment-0003.html>
More information about the ckan-dev
mailing list