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(http://example.com/favicon.ico), how can I make all url https?
Nginx Conf:
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;
}
}