kapt-labs / django-check-seo

Django Check SEO will check the SEO aspects of your site for you, and will provide advice in case of problems. Compatible with Django & Django-CMS!
GNU General Public License v3.0
154 stars 12 forks source link

InsecureRequestWarning #27

Closed corentinbettiol closed 4 years ago

corentinbettiol commented 4 years ago

When using django-check-seo, we can have some logs that says this:

InsecureRequestWarning, /home/me/projets/projectname/.venv/lib/python3.7/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'my-https-django-website.ext'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

We should redirect http requests to https ones. And django-check-seo is used in order to analyse public content, that is available all over the web.

corentinbettiol commented 4 years ago

We can provide a var to let the user set the correct protocol rather than trying https and then http. Default protocol should be https.

So the user must set a DJANGO_CHECK_SEO_FORCE_HTTP var to True in the settings.py file, that will force django-check-seo to check a url using http.