title: Django all url SSL
body: <p>I have setup a django application on digitalocean with minimal nginx and gunicorn setup. I am managing my dns using cloudflare and also using cloudflare's flexible ssl. Now the problem is all of my django generated urls have http url(<a href="http://example.com/favicon.ico" rel="nofollow noreferrer">http://example.com/favicon.ico</a>), how can I make all url https? </p>
  
  <p>Nginx Conf:</p>
  
  <pre><code>server {
  listen       80;
  client_max_body_size 4G;
  server_name  ***;
  
  location / {
      include proxy_params;
      proxy_pass http://unix:**.sock;
  }
  location /static {
      autoindex off;
      alias **/static_files;
  }
  
  location /media {
      autoindex off;
      alias **/media;
  }
  
  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
      root   html;
  }
  }
  </code></pre>