PacktPublishing / Django-4-by-example

Django 4 by example (4th Edition) published by Packt
https://djangobyexample.com/
MIT License
799 stars 461 forks source link

GET https://127.0.0.1:8000/static/js/bookmarklet.js?r=3481385548527016 net::ERR_CERT_AUTHORITY_INVALID #43

Closed alphaDia closed 1 year ago

alphaDia commented 1 year ago

Hi, I encountered this error when I tried to bookmark the images on a website running under HTTPS using Chrome.

My assumption is that the error is caused by using an SSL certificate that a CA does not issue.

I then switched to Firefox and on my first try to bookmark images I got an error that stated that the script was not loading but further investigation showed me that what prevented the file from loading was the following error MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT, it seems like it's the same cert problem with the Chrome browser.

All the following test was done under https://mysite.com:8000.

chrome version: 112.0.5615.137 (64 bits) firefox version: 112.0.2 (64 bits)

alphaDia commented 1 year ago

The way I solve this issue is I replaced the hostname mysite.com with the loopback address 127.0.0.1 like https://127.0.01:8000 and the error is gone both in Chrome and Firefox

Note: After that, you can switch back to https://mysite.com and everything will continue working fine.