22👍
✅
Just add .example.com
to ALLOWED_HOSTS
setting using your command line:
heroku config:set DJANGO_ALLOWED_HOSTS=.example.com,example.herokuapp.com
or using the heroku dashboard.
1👍
one line solution
#ALLOWED_HOSTS = ['localhost', '127.0.0.1','https://tm-sys-dashbobord.herokuapp.com/', config('SERVER', default='127.0.0.1')]
to replace
ALLOWED_HOSTS =['*']
- Defining a custom app_list in django admin index page
- Django request.user.is_authenticated is always true?
- How to test django model method __str__()
- Django: [email protected] in admin
Source:stackexchange.com