Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

django-sslify Usage with Cloudflare #2

Closed
JeffPaine opened this issue Mar 6, 2013 · 4 comments
Closed

django-sslify Usage with Cloudflare #2

JeffPaine opened this issue Mar 6, 2013 · 4 comments

Comments

@JeffPaine
Copy link

Apologies in advance if this isn't the appropriate place to note the following.

When using django-sslify with an app behind Cloudflare, you have to have the Cloudflare SSL option set to "Full SSL" (or possibly "Off", but I'm unable to test that).

Screenshot_3_6_13_7_44_AM

This is because if you have the Cloudflare SSL option set to "Flexible", even if the user specifies an HTTPS connection, Cloudflare will then connect to your app without SSL (see image above) and HTTP_X_FORWARDED_PROTO will be set to http. This will cause an infinite redirect loop as django-sslify attempts to redirect the connection to HTTPS - starting the whole loop over again.

Whether this is worth noting in the README or better to close this issue as a record for others to find via google, I'll leave to you @rdegges 😃

@rdegges
Copy link
Owner

rdegges commented Mar 7, 2013

Hey @JeffPaine, thanks for the issue! I think I'll just leave that commented out in here, as I know there are tons of SSL proxies / CDNs out there that all have different ways of doing it,so I don't want to go too-specific.

But I'm sure people will at least find this useful when searching!

Also, the Full SSL option makes sense, since django-sslify forces SSL, regardless of the origin. That way, when a user hits cloudflare, we'll still require cloudflare to talk to us directly with SSL as well.

Anyhow, thank you again!

@rdegges rdegges closed this as completed Mar 7, 2013
@JeffPaine
Copy link
Author

I think I'll just leave that commented out in here, as I know there are tons of SSL proxies / CDNs out there that all have different ways of doing it,so I don't want to go too-specific.

Good point, better to leave it general. Happy to help! Thanks again for the useful app!

@JeffPaine
Copy link
Author

But I'm sure people will at least find this useful when searching!

So, I was working through this issue today (a config issue, not the "fault" of django-sslify), and I'm searching GH and I find this very issue that I wrote up myself two years ago! Funny how time flies, the mind forgets and web (thankfully) doesn't. Cheers!

@rdegges
Copy link
Owner

rdegges commented Jan 11, 2015

I've had this same experience recently -- pretty odd!

<333 github issues

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants