It was because request.ssl? was always returning false in ensure_proper_protocol method inside SslRequirement.
Actually, request.ssl? method is checking the value of X-FORWARDED_PROTO.
So it turned out that you have to set X-FORWARDED_PROTO in Nginx's configuation file.
i.e.
server {
location / {
proxy_set_header X-FORWARDED_PROTO https;
}
}
No comments:
Post a Comment