Intro
Cloudflare's providing SSL for free now, and I would be a fool to not take advantage of this on my site, and a downright dickhead to break everything in the process of trying to.
I can code apps just fine, but when it comes to setting up or configuring https/nginx/gunicorn/etc/idon'tknowtheterminology, I know barely enough to follow Googled instructions.
Question
I would like to use django-sslify to force https on my Django web app. How may I achieve this without upsetting the balance in my life, given the following known facts?
Known facts
- I'm using Django 1.7, running on a DigitalOcean server hooked up to a (free) Cloudflare DNS. Django is fitted (served?) with nginx and gunicorn. Basically followed this guide to get it all set up.
- Accessing my website currently defaults to a regular http://example.com header.
- Manually accessing https://example.com works with the green lock and all, but this breaks all form submissions with the error "(403) CSRF verification failed. Request aborted.".
- In my Cloudflare site settings, the domain is currently configured to "Flexible SSL".
- Trying to use django-sslify with my existing setup totally breaks everything, and the browser is unable to return a response.
- This info nugget tells me that I should use the "Full SSL" configuration setting when using django-sslify with Cloudflare's SSL.
- Cause for hesitation found here where it is mentioned that a $20/mo Pro Cloudflare account is needed to handle SSL termination. So I really don't want to screw this up :/
- There was only 1 mention of "http" or "https" anywhere in my nginx and gunicorn configuration, specifically in my nginx config:
location / {
proxy_pass http://127.0.0.1:8001; ... }
Ok I think that's all I have
Also, my server is providing an Django Rest Framework api for a Phonegap app, does that need to be taken in to consideration? If I need to provide addtional information do let me know and I'll get back to you. Thank you for taking a look at this! :)