python - Django all url SSL -


i have setup django application on digitalocean minimal nginx , gunicorn setup. managing dns using cloudflare , using cloudflare's flexible ssl. problem of django generated urls have http url(http://example.com/favicon.ico), how can make 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; } } 

django provide secure_ssl_redirect setting redirecting urls https,

add on settings.py file

if not debug:     secure_ssl_redirect = true 

also , have @ guidelines ssl implementation here.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -